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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get rid of ASP_DEBUG_INFO

Status
Not open for further replies.

chunbo

Programmer
Jan 9, 2003
16
US
I have a script generate a CSV file from a table.
When I use as address, the CSV file will begin with
<!--METADATA TYPE=&quot;ASP_DEBUG_INFO&quot;-->

If I use the real address the CSV file won't gebin with <!--METADATA TYPE=&quot;ASP_DEBUG_INFO&quot;-->

My question is that how to get rid of the <!--META.....--> when using address?


Thanks

<%
Response.ContentType = &quot;application/csv&quot;
Response.AddHeader &quot;Content-Disposition&quot;, &quot;filename=mydata.csv;&quot;

Dim objConn, RS, FSO, field

Set FSO = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)

openDB() '//Open a database connection
Set RS = objConn.Execute(&quot;Select * from tractSvr order by tractName&quot;)

dim i
Do While Not RS.EOF
i=0
For Each Field In RS.Fields
i=i+1
if i<RS.fields.count then
If IsNull(Field) Then
Response.Write &quot;&quot;&quot;&quot; & &quot;&quot;&quot;&quot; & &quot;,&quot;
Else
Response.Write &quot;&quot;&quot;&quot; & Field.Value & &quot;&quot;&quot;&quot; & &quot;,&quot;
End If
Else'last field ommit ,
If IsNull(Field) Then
Response.Write &quot;&quot;&quot;&quot; & &quot;&quot;&quot;&quot;
Else
Response.Write &quot;&quot;&quot;&quot; & Field.Value & &quot;&quot;&quot;&quot;
End If
End if
Next
Response.Write vbcrlf
RS.MoveNext
Loop
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top