Stored Proc with EXEC Causes Error

D

don schilling

If inside my stored procedure, there is an EXEC "Some_sql_string" command,
ado errors out saying "Cannot find stored procedure "Some_sql_string". This
is inside the stored proc. Not a string I'm executing from dot net. I've
tried this in both c# and vb. Using both objCmd.ExecuteReader to fill a
data grid, or a data adapter to DataView to the data grid. Same error each
time. Like ado executes my first proc, then sees the EXEC tsql command, and
tries to treat it as a second stored proc. This worked fine in old ADO. I
dont understand how ado.net sees my sql string. Its inside a stored proc, I
would think sql would execute the proc and return the rs. It dosent matter
what commands are passed to sql EXEC, they always produce the same error.
Any ideas?
 
B

Bernie Yaeger

Hi Don,

I use exec inside vb .net all the time without difficulty or error. Can you
send me or show me the code you're using?

Bernie Yaeger
 
D

Don Schilling

My syntax error. Didnt have my string in quotes behind the exec
command. Worked in sql debug though. go figure. thanks anyway.
 

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

Top