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

What's Wrong With My Code??

Status
Not open for further replies.

RemyLabue

Programmer
Oct 22, 2007
1
US
Global.asa
------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart()

Dim strConn
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\faq.mdb"
Application("strConn") = strConn

End Sub

</SCRIPT>
------------
Default.asp
------------
<% Option Explicit %>
<html>
<head>
<title>Frequently Asked Questions</title>
</head>
<body>
<h2>FAQ</h2>
<ol>
<%
Dim rsFAQ
Set rsFAQ = Server.CreateObject("ADODB.Recordset")
rsFAQ.Open "FAQ", Application("strConn")
Do While Not rsFAQ.EOF
Response.Write "<li><b>" & rsFAQ("Question") & "</b>"
Response.Write "<p>" & rsFAQ("Answer") & "</p></li>"
rsFAQ.MoveNext
Loop
If rsFAQ.BOF Then
Response.Write "<p>No FAQs in the database!</p>" & vbNewLine
End If
rsFAQ.Close
%>
</ol>
</body>
</html>
--------------

Default.asp won't load into the browser... Any ideas what I did?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top