S
Sunshine
Hello all. I have a page which sends a query to an DB2 using an ODBC. The
results are then written to a text file. I am unable to write directly to
the users drive because of permissions. The problem I have is that when the
query set becomes too big, I get error '8007000e' Not enough storage is
available to complete this operation. The query is returning 100, 000
records or more. So my question is how do I handle this? Somebody had
suggested to me to chunk the data. However, I'm just a beginner and I
couldn't find an example on the web. I would appreciate any help...
Here is my code:
set conn = Server.CreateObject("ADODB.Connection")
conn.CommandTimeout=0
conn.ConnectionTimeout=0
conn.open "dsn=dsn;"
Session("Values") = "SELECT Satement"
set Recordset1 = conn.execute(Session("Values"))
Dim F, Head
Head = " "
For Each F In Recordset1.Fields
Head = Head & "," & F.Name
Next
Head = Mid(Head,3) & vbCrLf Response.ContentType = "text/plain"
Response.Write Head
Response.Write Recordset1.GetString(,,",",vbCrLf,"")
results are then written to a text file. I am unable to write directly to
the users drive because of permissions. The problem I have is that when the
query set becomes too big, I get error '8007000e' Not enough storage is
available to complete this operation. The query is returning 100, 000
records or more. So my question is how do I handle this? Somebody had
suggested to me to chunk the data. However, I'm just a beginner and I
couldn't find an example on the web. I would appreciate any help...
Here is my code:
set conn = Server.CreateObject("ADODB.Connection")
conn.CommandTimeout=0
conn.ConnectionTimeout=0
conn.open "dsn=dsn;"
Session("Values") = "SELECT Satement"
set Recordset1 = conn.execute(Session("Values"))
Dim F, Head
Head = " "
For Each F In Recordset1.Fields
Head = Head & "," & F.Name
Next
Head = Mid(Head,3) & vbCrLf Response.ContentType = "text/plain"
Response.Write Head
Response.Write Recordset1.GetString(,,",",vbCrLf,"")