Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL string works in access but not from VB.Net code

Status
Not open for further replies.

qwert231

Programmer
Joined
Sep 4, 2001
Messages
756
Location
US
My page is in VB.Net, and tries to do an OleDB.ExecuteNonQuery on this string:
INSERT INTO tblGCardDetails (OrderID, Image) VALUES(5924045, '0007')

I get an System.Data.OleDb.OleDbException: Syntax error in my code.
The same string works when dropped into an Access query. What could I be missing?
 
what type is OrderID and Image?
 
Sorry, thanks, I got it. Needed brackets around Image and Size (field names).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top