Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sp returning closed recordset in ado

Author  Topic 

DeepDiver
Starting Member

14 Posts

Posted - 2005-05-11 : 11:59:20
hi,

i have a stored procedure using a dynamic sql statement to select
some values from a table.

when i execute the sp using ado(cpp) it returns a closed recordset.

i suspect ado cannot determine the colums returned by the sp.

anybody a solution?

thx

PS:
using .net classes in the namespace SqlClient i get all the data i want!

nod
Starting Member

19 Posts

Posted - 2005-05-11 : 12:04:13
I'm not a .net developer but I believe that you must bind the columns that are being returned by the sp.
Go to Top of Page

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-05-11 : 12:54:14
quote:
Originally posted by DeepDiver

hi,

i have a stored procedure using a dynamic sql statement to select
some values from a table.

when i execute the sp using ado(cpp) it returns a closed recordset.

i suspect ado cannot determine the colums returned by the sp.

anybody a solution?

thx

PS:
using .net classes in the namespace SqlClient i get all the data i want!






well, try setting at the beginning of the sproc code:
Set NOCOUNT ON

and at the end of the sproc
Set NOCOUNT OFF

________________________________________________

Beer is a privilege of the working man.

In the fridge: Edil Pils.

Go to Top of Page

DeepDiver
Starting Member

14 Posts

Posted - 2005-05-12 : 04:27:27
that was it - many thanks!

quote:
Originally posted by Vivaldi

quote:
Originally posted by DeepDiver

hi,

i have a stored procedure using a dynamic sql statement to select
some values from a table.

when i execute the sp using ado(cpp) it returns a closed recordset.

i suspect ado cannot determine the colums returned by the sp.

anybody a solution?

thx

PS:
using .net classes in the namespace SqlClient i get all the data i want!






well, try setting at the beginning of the sproc code:
Set NOCOUNT ON

and at the end of the sproc
Set NOCOUNT OFF

________________________________________________

Beer is a privilege of the working man.

In the fridge: Edil Pils.



Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2005-05-12 : 07:20:02
Even better, stick with intrinsic .NET tools
Go to Top of Page
   

- Advertisement -