c# - OleDbCommand Stored Procedure Cannot Find Access Query -
i attempting run access append query in c# using oledbcommand.
as test created 2 queries in database (one copy of other)
appendmeappend me
appendme works fine when attempt execute second append me oledbexception "cannot find input table or query 'append'" in other words seeing first word of string. i've tried manipulating string (using verbatim string etc)
nothing works.
using c# express 2010 , access 2003
here's extract of 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();
if sql indentifier contains funny characters, such space, must enclosed in square brackets.
[append me]
Comments
Post a Comment