streaming result sets to disk using the SQLOLEDB provider

streaming result sets to disk using the SQLOLEDB provider

Post by Chri » Wed, 25 Jun 2003 10:10:38

All -

I'm using the SQLOLEDB driver to execute "for xml" queries in sql server.
Results are being put into a _StreamPtr.

Some queries are going to be returning large data sets which I don't want to
load into memory.

What methods are available to govern how big the streams buffer is, when
data is done being send into the stream from the driver etc?  Are there any
C++ (or other languages) examples out there?

I'd like to write results directly to disk in relatively small chunks as it
comes back from the db if possible.



1. Closed result sets on SQLOLEDB connected stored procedures

Found an interesting problem.  I'm running IIS 4.0 with ASP connecting to
SQL 6.5 SP5a on a different machine.  If I connect to the database using a
SQLOLEDB connection, I always get a closed result set when using a stored
procedure.  For example:



 ...  conn is open using SQLOLEDB

 strSQL = "Test '" & strUserName & "'"
 Set rs = conn.Execute(strSQL)

 If Not rs.Eof  Then Response.Write("Success")


Looking into the database the field Number has successfully been incremeted,
but the record set is closed.  I get an error saying that the record set
must be open to perform that function (pointing to the line with the rs.Eof

If I use the identical code but create the connectiong using a DSN or ADO
provider, it works with no problems.  Is this a known bug or is there a
workaround?  Any help or insight would be greatly appreciated!  Thanks in

Greg Waugh

2. Patch: use SCM_CREDS authentication over PF_LOCAL sockets

3. SQLOLEDB problem w/ compound SQL returns more result sets than expected

4. How? Open a table without a component

5. OpenQuery using OLE DB provider 'SQLOLEDB'

6. insert xml into table - problems!

7. Only sa Connects using SQLOLEDB provider

8. Comparison of HyTech 1.5 to Paradox,FoxBase,FoxPro,Clipper on 40 000 entries. Anyone heard it?

9. Can't connect using OleDB provider SQLOLEDB

10. SQLOLEDB subset using OLE DB Provider template

11. ASP Script using SQLOLEDB provider Question....

12. Can't retrieve temp table rows using SQLOLEDB provider

13. Problem using ADO stream object for result of XML template against SQL 2K