I can read info out of my database fine, i just cant seem to get it to update at all. I havent tried insert yet at all.
Here is the code im using.
Dim Sql As String
Dim Cmd As OleDb.OleDbCommand
Dim Reader As OleDb.OleDbDataReader
Dim Con = New OleDb.OleDbConnection("PROPER SERVER INFO EDITED OUT")
Con.Open()
Sql = "UPDATE CUSTOMER SET First_name = '" & fname & "', Last_name = '" & lname & "', Company= '" & company & "', Address= '" & address & "', City= '" & city & "', State= '" & state & "', Zip= '" & zip & "', Email= '" & email & "', Phone_no= '" & phoneno & "', Online_password= '" & pword & "' WHERE Cust_no ='" & idtext & "'"
Cmd = New OleDb.OleDbCommand(Sql, Con)
Here is the string that my system sees, as output by a label.
UPDATE CUSTOMER SET First_name = 'Jerry ', Last_name = 'Smith ', Company= 'Johnson Controls ', Address= '100 Johnson St ', City= 'Milwaukee ', State= 'WI', Zip= '53212', Email= 'jerry@gmail.com ', Phone_no= '4144565896', Online_password= 'qwerty' WHERE Cust_no ='1001'
Any idea why it might not think the customer number is 1001 and then not update?
Here is the code im using.
Dim Sql As String
Dim Cmd As OleDb.OleDbCommand
Dim Reader As OleDb.OleDbDataReader
Dim Con = New OleDb.OleDbConnection("PROPER SERVER INFO EDITED OUT")
Con.Open()
Sql = "UPDATE CUSTOMER SET First_name = '" & fname & "', Last_name = '" & lname & "', Company= '" & company & "', Address= '" & address & "', City= '" & city & "', State= '" & state & "', Zip= '" & zip & "', Email= '" & email & "', Phone_no= '" & phoneno & "', Online_password= '" & pword & "' WHERE Cust_no ='" & idtext & "'"
Cmd = New OleDb.OleDbCommand(Sql, Con)
Here is the string that my system sees, as output by a label.
UPDATE CUSTOMER SET First_name = 'Jerry ', Last_name = 'Smith ', Company= 'Johnson Controls ', Address= '100 Johnson St ', City= 'Milwaukee ', State= 'WI', Zip= '53212', Email= 'jerry@gmail.com ', Phone_no= '4144565896', Online_password= 'qwerty' WHERE Cust_no ='1001'
Any idea why it might not think the customer number is 1001 and then not update?