I am attempting to run an Access append query in C# using OleDbCommand.
As a test I created two queries in the database (one a copy of the other)
AppendMe
Append Me
AppendMe
works fine but when I attempt to execute the second Append Me
I get an OleDbException
"cannot find the input table or query 'Append'" In other words its only seeing the first word of the string. I've tried manipulating the string (using verbatim string etc)
Nothing works.
I am using c# Express 2010 and Access 2003
Here's an extract of the code
OleDbConnection conn = new OleDbConnection(connStr);
conn.Open();
string StdProc = "Append Me";
OleDbCommand cmd = new OleDbCommand(StdProc, conn);
cmd.CommandType = CommandType.StoredProcedure;
OleDbDataReader rdr = cmd.ExecuteReader();