bikebanditcom
Programmer
i am trying to generate a excel chart from a recordset that can be saved (i'd be nice if it would save and display) but i can deal with having the user hit file - save as. the following is my page can anyone tell me why the chart comes up blank?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Response.ContentType = "application/vnd.ms-excel"
set pbcDB = server.createObject("ADODB.Connection"
pbcDB.open "pbc"
set objrs=pbcDB.execute("select * from tblUsers"
%>
<TABLE BORDER=1>
<TR>
<%
' Loop through each Field, printing out the Field Names
For i = 0 to objrs.fields.count - 1
%>
<TD><% = objrs(i).name %></TD>
<% next %>
</TR>
<%
' Loop through rows, displaying each field
while not objrs.eof
%>
<TR>
<% For i = 0 to objrs.fields.count - 1
%>
<TD VALIGN=TOP><% = objrs(i) %></TD>
<% Next %>
</TR>
<%
objrs.MoveNext
wend
objrs.Close
pbcDB.close
set pbcDB = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Response.ContentType = "application/vnd.ms-excel"
set pbcDB = server.createObject("ADODB.Connection"
pbcDB.open "pbc"
set objrs=pbcDB.execute("select * from tblUsers"
%>
<TABLE BORDER=1>
<TR>
<%
' Loop through each Field, printing out the Field Names
For i = 0 to objrs.fields.count - 1
%>
<TD><% = objrs(i).name %></TD>
<% next %>
</TR>
<%
' Loop through rows, displaying each field
while not objrs.eof
%>
<TR>
<% For i = 0 to objrs.fields.count - 1
%>
<TD VALIGN=TOP><% = objrs(i) %></TD>
<% Next %>
</TR>
<%
objrs.MoveNext
wend
objrs.Close
pbcDB.close
set pbcDB = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>