S
Sunshine
I'm trying to break up this large query to download 2 or more files,
otherwise I recieve a memory error. I can't get the following code to write
to 2 different files. The error I get is because I try to
Response.AddHeader more than once. The query will return 190000 + records
and I am unable to download the data directly to the users computer due to
permissions. How do I get around this?
dim i
set Recordset1 = conn.execute("select * from table")
Dim F, Head Head = " "
For Each F In Recordset1.Fields
Head = Head & "," & F.Name
Next
Head = Mid(Head,3) & vbCrLf
Response.ContentType = "text/plain"
for i = 1 to 2
fn = "file" + cstr(i) + ".txt"
Response.AddHeader "Content-Disposition", "attachment; filename=" + fn
******* ERROR LINE ********
Response.Flush() Response.Write Head
Response.Write Recordset1.GetString(,50000,",",vbCrLf,"")
next
conn.Close
otherwise I recieve a memory error. I can't get the following code to write
to 2 different files. The error I get is because I try to
Response.AddHeader more than once. The query will return 190000 + records
and I am unable to download the data directly to the users computer due to
permissions. How do I get around this?
dim i
set Recordset1 = conn.execute("select * from table")
Dim F, Head Head = " "
For Each F In Recordset1.Fields
Head = Head & "," & F.Name
Next
Head = Mid(Head,3) & vbCrLf
Response.ContentType = "text/plain"
for i = 1 to 2
fn = "file" + cstr(i) + ".txt"
Response.AddHeader "Content-Disposition", "attachment; filename=" + fn
******* ERROR LINE ********
Response.Flush() Response.Write Head
Response.Write Recordset1.GetString(,50000,",",vbCrLf,"")
next
conn.Close