snakeeyes1978
Programmer
Currently I have the code listed below, which generates an Excel spreadsheet from the data retrieved from SQL Server using a recordset. Does anyone know if it is possible to extract the data into a PDF file instead?
dim Cn,Rs
set Cn=server.createobject("ADODB.connection")
set Rs=server.createobject("ADODB.recordset")
Cn.open "Provider=SQLOLEDB.1;Persist Security
Info=False;Initial Catalog= (etc etc)"
Rs.open "SELECT * FROM tblRecords",Cn,1,3
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;
filename=Records.xls"
If RS.EOF = FALSE then
Do while not rs.eof
response.write "<table border=1>"
Response.Write "<tr>"
Response.Write "<td width='140'><b>Name</b></td>"
Response.Write "<td>"
Response.Write rs.fields("Name")
Response.Write "</td></tr>"
RS.Movenext
Loop
End if
dim Cn,Rs
set Cn=server.createobject("ADODB.connection")
set Rs=server.createobject("ADODB.recordset")
Cn.open "Provider=SQLOLEDB.1;Persist Security
Info=False;Initial Catalog= (etc etc)"
Rs.open "SELECT * FROM tblRecords",Cn,1,3
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;
filename=Records.xls"
If RS.EOF = FALSE then
Do while not rs.eof
response.write "<table border=1>"
Response.Write "<tr>"
Response.Write "<td width='140'><b>Name</b></td>"
Response.Write "<td>"
Response.Write rs.fields("Name")
Response.Write "</td></tr>"
RS.Movenext
Loop
End if