WTF? I dont see what my problem is with this code.
sql2 = "SELECT Order_no FROM ORDER WHERE Cust_no ='" & idtext & "'"
cmd2 = New OleDb.OleDbCommand(sql2, Con)
The error I get is: Incorrect syntax near the keyword 'ORDER'
Cust_no is a foreign key in my ORDER tab. Order number is the primary key of the table. The table is populated with data. I dont see what the heck I am doing wrong.
idtext is read off of a text box.
ie. idtext = textbox1.text
sql2 = "SELECT Order_no FROM ORDER WHERE Cust_no ='" & idtext & "'"
cmd2 = New OleDb.OleDbCommand(sql2, Con)
The error I get is: Incorrect syntax near the keyword 'ORDER'
Cust_no is a foreign key in my ORDER tab. Order number is the primary key of the table. The table is populated with data. I dont see what the heck I am doing wrong.
idtext is read off of a text box.
ie. idtext = textbox1.text
