Hello all. First post here.
I'm having troubles getting my sort of pseudo-frontend to UPDATE tables.
The code is as follows:
It does... nothing, to the best of my knowledge. I have another SELECT function which easily retrieves the data, but this UPDATE statement doesn't work at all. Keep in mind that I have significantly shorted it (user input would provide First_Name, Last_Name, and a few other things to UPDATE) to see if it was a syntax problem, but it isn't, as the database accepts it if I punch it in directly.
I'm using normal VB.NET and the MySQL ODBC Driver running off of MySQL 4.0.22.
Any help is appreciated.
I'm having troubles getting my sort of pseudo-frontend to UPDATE tables.
The code is as follows:
VB.NET:
Private Function SQL_CustomerUpdate()
Dim MyConString As String = ("DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.0.15;DATABASE=store;UID=hallo;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
It does... nothing, to the best of my knowledge. I have another SELECT function which easily retrieves the data, but this UPDATE statement doesn't work at all. Keep in mind that I have significantly shorted it (user input would provide First_Name, Last_Name, and a few other things to UPDATE) to see if it was a syntax problem, but it isn't, as the database accepts it if I punch it in directly.
I'm using normal VB.NET and the MySQL ODBC Driver running off of MySQL 4.0.22.
Any help is appreciated.