Hi,
I am new to asp.I have a database writen in access & a .asp code.It doesn't seem to be working.It just shows page not displayed & doesn't show the error( i am trying to test it in 7host.com as i don't have IIS or pws in windows ME).My database is odbc_exmp.mdb & my table is "names"
My code is
<% @ Language = VBScript %>
<% Response.buffer = true %>
<html>
<head>
<title>Stardeveloper.com Database Tutorial</title>
</head>
<body>
test
<% Dim conn, rs
dbfile=Server.MapPath("odbc_exmp.mdb"
strConnString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../odbc_exmp.mdb"
Set conn = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.RecordSet"
rs.Open "names"
While Not rs.EOF
Response.Write "ID : " & rs("id"
& "<br>"
Response.Write "First Name : " & rs("first_name"
& "<br>"
Response.Write "Last Name : " & rs("last_name"
& "<br>"
Response.Write "<br>"
rs.MoveNext
Wend
rs.Close
Set rs = Nothing %>
</body>
</html>
Any help will be greatly appreciated !! Thanks !!
I am new to asp.I have a database writen in access & a .asp code.It doesn't seem to be working.It just shows page not displayed & doesn't show the error( i am trying to test it in 7host.com as i don't have IIS or pws in windows ME).My database is odbc_exmp.mdb & my table is "names"
My code is
<% @ Language = VBScript %>
<% Response.buffer = true %>
<html>
<head>
<title>Stardeveloper.com Database Tutorial</title>
</head>
<body>
test
<% Dim conn, rs
dbfile=Server.MapPath("odbc_exmp.mdb"
strConnString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../odbc_exmp.mdb"
Set conn = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.RecordSet"
rs.Open "names"
While Not rs.EOF
Response.Write "ID : " & rs("id"
Response.Write "First Name : " & rs("first_name"
Response.Write "Last Name : " & rs("last_name"
Response.Write "<br>"
rs.MoveNext
Wend
rs.Close
Set rs = Nothing %>
</body>
</html>
Any help will be greatly appreciated !! Thanks !!