Having a bit of a problem getting UPDATE working. The project in
question is a simple MySQL VB.NET frontend, allowing Insertion,
Selection, and others.
Well, I've gotten Drop and Insert working, but to edit a table row,
I'd like to use Update.
I have the following code in a class:
Private Function SQL_CustomerUpdate()
Dim MyConString As String = ("DRIVER={MySQL ODBC 3.51
Driver};SERVER=192.168.0.15;DATABASE=store;UID=hal
lo;PASSWORD=zomgnone;OPTION=3;")
Dim MyConnection As New
OdbcConnection(MyConString)
MyConnection.Open()
Dim MyCommand As New OdbcCommand
MyCommand.Connection = MyConnection
MyCommand.CommandText = "UPDATE customer SET
First_Name='ZOMG666777' WHERE id=2"
MyCommand.ExecuteNonQuery()
MyConnection.Close()
'MyConnection.Dispose()
End Function
Keep in mind that the UPDATE syntax was much more complex, but I'm
trying to get it working at a very simple level so I can see if it
actually works or not.
It doesn't. :(
Can anyone help?
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*