Stored Proc with EXEC Causes Error

  • Thread starter Thread starter don schilling
  • Start date Start date
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?
 
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
 
My syntax error. Didnt have my string in quotes behind the exec
command. Worked in sql debug though. go figure. thanks anyway.
 
Back
Top