01-01-17, 01:07 AM
استفسار
الان بعد
التاكد من وجود الشخص
المطلوب في البحث
كيف ممكن احدد ال ID الخاص به علشان اقوم بالتحديث
وشكرا من جديد
الان بعد
التاكد من وجود الشخص
المطلوب في البحث
كود :
Dim con As New SQLiteConnection("Data Source=tables.s3db")
Dim cmdi As New SQLiteCommand(" SELECT COUNT(*) 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()
If cmdi.ExecuteScalar = 0 Thenكيف ممكن احدد ال ID الخاص به علشان اقوم بالتحديث
كود :
Dim rcvd As String = String.Empty
rcvd = "Y"
Dim cmd As New SQLiteCommand("UPDATE table SET trcvd=@trcvd WHERE id=@id ", con)
cmd.Parameters.AddWithValue("@trcvd", rcvd)
cmd.Parameters.AddWithValue("@id", ????)
cmd.ExecuteNonQuery()
con.Close()وشكرا من جديد

