Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Database Query with Store

Status
Not open for further replies.

DannyC

Programmer
Joined
Mar 28, 2001
Messages
2
Location
IE
Hi

Can any body help me with the following scenario.

In VB,I am populating a Recordset by running a Stored Procedure in sybase thru an ADO DB query

however, the Stored procedure produces its results in two selects. for example, the results are:

Field1 Field2 Field3
a b c
Field1 Field2 Field3 Field4 Field5
1 2 3 4 5

Notes:
* I Can't Use UNION on the SQL proc, due to the different no of Fields returned, and their different defs (Char/int)
* Cant do two DB Queries, as the results are in #TMP tables and only exist when we run the SQL proc

Is there a way to read the recordset
a b c (firstrecord)
1 2 3 4 5 (secondrecord)

Any ideas
Thanks for reading
Danny
 
Couldn't you convert all fields to varchar, dummy up the extra fields in the first select with nulls to do the UNION, and then convert numeric fields back once its returned?

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top