Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Getting a file not found error on IIS?

Author  Topic 

o2bnlv
Starting Member

5 Posts

Posted - 2012-07-11 : 00:27:17
Running on Vista. All other files are appearing normally. Here's the code, which I'm using to create a table which will then be exported to Excel:


<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "filename=excelfile.xls"
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("users.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.open "SELECT * FROM Sales WHERE adminid =" & session("username") & "", conn, 3,3
%>
</head>
<body>
<table>
<%
do while not rs.EOF
%>
<tr>
<td><%=rs.Fields("saletime")%></td>
<td><%=rs.Fields("level2id")%></td>
<td><%=rs.Fields("itemdesc")%></td>
<td><%=rs.Fields("itemprice")%></td>
</tr>
<%
rs.Movenext
loop
rs.Close
set rs=nothing
set conn = nothing
%>
</table>

   

- Advertisement -