vinumat
03-18-2010, 04:47 AM
Hi again,
I tried the below code and have a valid 'countrydb.mdb' database. But after running this, all it returns is 'Country..... City..... Currency..... Population' and nothing else. It should be displaying the country name, city etc.
Can you tell me why??? Pleasee...
Thanks a lot guys!
<% @language = VBScript %>
<head>
<TITLE>ASP - Country Query</TITLE>
<body>
<%
Dim MyConn, MydbFilePath
Set MyConn = Server.CreateObject("ADODB.Connection")
MydbFilePath = Server.MapPath("countrydb.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & MydbFilePath & ";"
query1 = "SELECT * FROM Countrytbl"
Set RS = MyConn.Execute(query1)
%>
Country..... City..... Currency..... Population<br><br>
<ul>
<%
WHILE NOT RS.EOF
%>
<li>
<% =RS("Country") %> .....
<% =RS("City") %> .....
<% =RS("Currency") %> .....
<% =RS("Population") %>
</li>
<%
RS.MoveNext
WEND
%>
</ul>
</body>
</head>
I tried the below code and have a valid 'countrydb.mdb' database. But after running this, all it returns is 'Country..... City..... Currency..... Population' and nothing else. It should be displaying the country name, city etc.
Can you tell me why??? Pleasee...
Thanks a lot guys!
<% @language = VBScript %>
<head>
<TITLE>ASP - Country Query</TITLE>
<body>
<%
Dim MyConn, MydbFilePath
Set MyConn = Server.CreateObject("ADODB.Connection")
MydbFilePath = Server.MapPath("countrydb.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & MydbFilePath & ";"
query1 = "SELECT * FROM Countrytbl"
Set RS = MyConn.Execute(query1)
%>
Country..... City..... Currency..... Population<br><br>
<ul>
<%
WHILE NOT RS.EOF
%>
<li>
<% =RS("Country") %> .....
<% =RS("City") %> .....
<% =RS("Currency") %> .....
<% =RS("Population") %>
</li>
<%
RS.MoveNext
WEND
%>
</ul>
</body>
</head>