01-01-17, 02:27 AM
(01-01-17, 01:54 AM)مساعدة كتب : تفضل الكود
كود :
Dim con As New SQLiteConnection("Data Source=tables.s3db")
Dim cmdi As New SQLiteCommand(" SELECT id FROM table WHERE name = @name and Date = @Date and time = @time", con)
cmdi.Parameters.AddWithValue("@name", DataGridView1.Rows(i).Cells(1).Value)
cmdi.Parameters.AddWithValue("@Date", DataGridView1.Rows(i).Cells(2).Value)
cmdi.Parameters.AddWithValue("@time", DataGridView1.Rows(i).Cells(3).Value)
con.Open()
Dim id As Integer = cmdi.ExecuteScalar
If id = 0 Then
شكرا على الرد
جربت الكود وجربت اشوف الناتج في
MsgBox(id)
ويطلع لي الرقم صفر
يعني ما يقراء رقم ال id

