SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 Getting a file not found error on IIS?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

o2bnlv
Starting Member

5 Posts

Posted - 07/11/2012 :  00:27:17  Show Profile  Reply with Quote
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>

  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000