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_CustomerUpd ate()
Dim MyConString As String = ("DRIVER={My SQL ODBC 3.51
Driver};SERVER= 192.168.0.15;DA TABASE=store;UI D=hal
lo;PASSWORD=zom gnone;OPTION=3; ")
Dim MyConnection As New
OdbcConnection( MyConString)
MyConnection.Op en()
Dim MyCommand As New OdbcCommand
MyCommand.Conne ction = MyConnection
MyCommand.Comma ndText = "UPDATE customer SET
First_Name='ZOM G666777' WHERE id=2"
MyCommand.Execu teNonQuery()
MyConnection.Cl ose()
'MyConnection.D ispose()
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
*-----------------------*