![]() |
| ||
| syntax error in INSERT INTO statement here is my code Dim oledbcom As New OleDb.OleDbCommand oledbcom.CommandText = ("INSERT INTO Customer Company, Address, Telephone values ?,?,?") oledbcom.Connection = oledbcon Dim oledbparam As OleDb.OleDbParameter = _ oledbcom.Parameters.Add("@Company", OleDb.OleDbType.VarChar, 30) oledbparam.Value = txtCompName.Text.Trim() oledbparam = oledbcom.Parameters.Add("@Address", OleDb.OleDbType.VarChar, 80) oledbparam.Value = txtAddress.Text.Trim oledbparam = oledbcom.Parameters.Add("@Telephone", OleDb.OleDbType.VarChar, 15) oledbparam.Value = txtContact.Text.Trim oledbcom.ExecuteNonQuery() |
| ||
| Re: syntax error in INSERT INTO statement Didn't test it but if I remember right oledbcom.CommandText = ("INSERT INTO Customer Company, Address, Telephone values ?,?,?")should beoledbcom.CommandText = ("INSERT INTO Customer (Company, Address, Telephone) values (?,?,?)")HTH |
| ||
| Re: syntax error in INSERT INTO statement thnx a ton. tht worked grt. |
| ||
| Re: syntax error in INSERT INTO statement Hi! Nice to hear that you got answer to your problem. Could you please mark the thread as solved. Thank you! |
| All times are GMT -4. The time now is 9:09 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC