The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
[Originally posted by awiggans]

I am using MS Access and getting a syntax error when I execute the
comm.Prepare(); statement.

Can anyone see what I am missing here. I have tried everything.

Thanks for your help. Aaron

string strConn = null;
OleDbConnection myConn = new OleDbConnection(strConn) ;
this.GetConnection(ref myConn, ref strConn);

string strSQL = "UPDATE Customer ( status ) Values (?) "
+ "WHERE ((id) = (?) AND (storeID) = (?))";

OleDbCommand comm = new OleDbCommand(strSQL,myConn) ;

comm.Parameters.Add("status", OleDbType.Char, 3);

comm.Parameters.Add("id", OleDbType.Integer);
comm.Parameters.Add("storeID", OleDbType.UnsignedTinyInt);