getting error in ADO in stored proc with two calls

R

rsstonejr

Hello.

I'm trying to run a stored proc with the following statement sample:

create procedure sproc
as
execute ('insert into table1 (fields) values (fields)')
execute ('select fields from table1')

I need the 'execute' because I'm dynamically building a 'where' clause.

When this is returned to my recordset in ADO, I get the following error
message:

"Run-time error '7965': The object your entered is not a valid
Recordset property."

If I comment out the 'insert' execute statement, it works fine. Setting
'no count' to off in the stored proc did nothing.

Any ideas?

Thanks in advance,
Stoney
 

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