EXEC in TSQL stored proc causes ERROR

D

don schilling

If I fill my datagrid using a stored procedure that includes the tsql
command "EXEC", the grids reader gives error "Could not find stored
procedure".

Im filling a datagrid by using a command object to a stored procedure:
datagrid.DataSource = objCmd.ExecuteReader(); datagrid.DataBind();
Everything works fine, unless, in the stored proc, the command EXEC
'some sql string' is used. Then, the reader gives the "Could not find
stored procedure ALL OF MY SQL STRING HERE". Like the reader is trying
to find a procedure with a name matching the contents of my sql string
rather than just letting the proc exec the string and return a rs. I
must use a stored proc, and sometimes the proc must use the "EXEC"
command. This used to work fine in ADO. Any ideas?

TIA
Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top