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.
| 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 selectsome 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?thxPS: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. |
 |
|
|
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 selectsome 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?thxPS: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 ONand at the end of the sprocSet NOCOUNT OFF________________________________________________Beer is a privilege of the working man.In the fridge: Edil Pils. |
 |
|
|
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 selectsome 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?thxPS: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 ONand at the end of the sprocSet NOCOUNT OFF________________________________________________Beer is a privilege of the working man.In the fridge: Edil Pils.
|
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2005-05-12 : 07:20:02
|
Even better, stick with intrinsic .NET tools |
 |
|
|
|
|
|