return mulitple recordsets using stored procs?

return mulitple recordsets using stored procs?

Post by kh.. » Sat, 22 Jul 2000 04:00:00



I want to find out how to return multiple recordsets using stored procs
on sql server and using the ADODB CONNECTION/COMMAND/RECORDSET objects.

i have a stored proc which does 2 selects at the end. when i run using
ISQL i see both the recordset.

but i need to access these using ado. i can access the first one but i
tried to access the second one using the nextrecorset method but it
failed.

any suggestions/answers?

Thansks!

Jitendra KHARE

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

return mulitple recordsets using stored procs?

Post by George Poulos » Sat, 22 Jul 2000 04:00:00


Set the query time out value to zero.

Check out Query Tools from:

http://gpoulose.home.att.net/

GEorge


> I want to find out how to return multiple recordsets using stored procs
> on sql server and using the ADODB CONNECTION/COMMAND/RECORDSET objects.

> i have a stored proc which does 2 selects at the end. when i run using
> ISQL i see both the recordset.

> but i need to access these using ado. i can access the first one but i
> tried to access the second one using the nextrecorset method but it
> failed.

> any suggestions/answers?

> Thansks!

> Jitendra KHARE

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

return mulitple recordsets using stored procs?

Post by Carl Prothma » Sun, 23 Jul 2000 04:00:00


Jitendra,
Take a look at the following KB articles:

BUG: NextRecordset Fails on Remoted or Disconnected Records
http://support.microsoft.com/support/kb/articles/Q189/9/48.ASP

PRB: NextRecordset Fails When Called On a Disconnected Recordset
http://support.microsoft.com/support/kb/articles/Q193/3/52.ASP

PRB: NextRecordset Never Returns Null or Nothing
http://support.microsoft.com/support/kb/articles/Q189/8/38.ASP

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com


> I want to find out how to return multiple recordsets using stored procs
> on sql server and using the ADODB CONNECTION/COMMAND/RECORDSET objects.

> i have a stored proc which does 2 selects at the end. when i run using
> ISQL i see both the recordset.

> but i need to access these using ado. i can access the first one but i
> tried to access the second one using the nextrecorset method but it
> failed.

> any suggestions/answers?

> Thansks!

> Jitendra KHARE

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

return mulitple recordsets using stored procs?

Post by kh.. » Tue, 25 Jul 2000 04:00:00


I checked my code for the things the knowledgebase articles talk about
and am not doing them...but it still does not work...

Thanks for the help though!

Jitendra KHARE

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Returning a shaped ADO.Recordset using Stored Procs

Hi,

I am trying to return a shaped recordset from SQL7 and I hope to use stored
procs.

I know that you cant use a stored proc to generate the shaped recordset, but
I was hoping to use something like this:

    strSQL = ""
    strSQL = strSQL & "SHAPE {usp_PointsAllocRuleGetById ?} "
    strSQL = strSQL & "AS rsPointsAllocRule "
    strSQL = strSQL & "APPEND ({usp_PointsAllocRuleProductsGetById ?} "
    strSQL = strSQL & "AS rsPointsAllocRuleProduct "
    strSQL = strSQL & "RELATE PointsAllocRuleId To PointsAllocRuleId)"

as the commandtext.

It seems to work if the I only use one stored proc asn the parent, and
dynamic sql as the rest. eg:

'    strSQL = ""
'    strSQL = strSQL & "SHAPE {EXEC usp_PointsAllocRuleGetById ?} "
'    strSQL = strSQL & "AS rsPointsAllocRule "
'    strSQL = strSQL & "APPEND ({SELECT  PointsAllocRuleId , ProductCode
FROM PointsAllocRuleProduct WHERE PARP.PointsAllocRuleId = ?} "
'    strSQL = strSQL & "AS rsPointsAllocRuleProduct "
'    strSQL = strSQL & "RELATE PointsAllocRuleId To PointsAllocRuleId)"

If anyone has any ideas on this I'd much appriate it.

Cheers

Gordon Staines

2. NOT IN CLAUSE - NOT RETURNING ROWS

3. distinct count problem

4. Help - Stored Procs returning multiple closed recordsets

5. access and show more than one record

6. Mass Faxing Paradox Data

7. stored procs - returning recordsets and parameters

8. Help - Stored Procs returning multiple closed recordsets