I am just learning ASP and I'm having tons of trouble connecting to a simple database. I keep getting this error "Microsoft VBScript runtime error '800a01f4'...Variable is undefined: 'mySQL'.../robsasp.asp, line 14" Can anyone help? here is the code.......<br>
<br>
<% Option Explicit %><br>
<br>
<html><br>
<br>
<body><br>
<br>
<h1>The Cafeteria Menu</h1><br>
<br>
<% <br>
Dim objConn<br>
Set objConn = Server.CreateObject("ADODB.Connection") <br>
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=e:\web\alsnevada.com\menu.mdb; Initial Catalog=menu; User ID=; Password="<br>
' myDSN="DRIVER={Microsoft Access Driver (*.mdb)};"<br>
mySQL="select * FROM Menu ORDER BY Date"<br>
Set OnMenu = Connect.Execute(mySQL)<br>
do until OnMenu.EOF %><br>
<font size=5><%=OnMenu("Date")%></font><br><br>
Main Course: <%=OnMenu("MainCourse")%><br><br>
Fruit: <%=OnMenu("Fruit")%><br><br>
Vegetables: <%=OnMenu("Vegetable")%><br><br>
Dessert: <%=OnMenu("Dessert")%><br><br>
<% OnMenu.MoveNext<br>
loop %><br>
</body><br>
</html>
<br>
<% Option Explicit %><br>
<br>
<html><br>
<br>
<body><br>
<br>
<h1>The Cafeteria Menu</h1><br>
<br>
<% <br>
Dim objConn<br>
Set objConn = Server.CreateObject("ADODB.Connection") <br>
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=e:\web\alsnevada.com\menu.mdb; Initial Catalog=menu; User ID=; Password="<br>
' myDSN="DRIVER={Microsoft Access Driver (*.mdb)};"<br>
mySQL="select * FROM Menu ORDER BY Date"<br>
Set OnMenu = Connect.Execute(mySQL)<br>
do until OnMenu.EOF %><br>
<font size=5><%=OnMenu("Date")%></font><br><br>
Main Course: <%=OnMenu("MainCourse")%><br><br>
Fruit: <%=OnMenu("Fruit")%><br><br>
Vegetables: <%=OnMenu("Vegetable")%><br><br>
Dessert: <%=OnMenu("Dessert")%><br><br>
<% OnMenu.MoveNext<br>
loop %><br>
</body><br>
</html>