Private Sub DataGridView1_CellMouseDoubleClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseDoubleClick
Dim i As Integer
i = DataGridView1.CurrentRow.Index
Dim B_ID As Integer
Dim D_ID As Date
B_ID = Convert.ToUInt32(DataGridView1.Item(1, i).Value)
D_ID = (DataGridView1.Item(8, i).Value)
StrSQL = "INSERT INTO renttmp1(Barcode_ID,DateEnd,DateOver)VALUES(" & B_ID & "," & D_ID & ", NOW())"
ds = New DataSet
da = New MySqlDataAdapter(StrSQL, MySQLConn)
da.Fill(ds, "renttmp1")
MySQLConn.Close()
Me.Close()
End Sub
Tag : .NET, MySQL, Win (Windows App), VB.NET, VS 2012 (.NET 4.x)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '14:07:52)' at line 1