ASAAKI
11-11-2002, 03:17 PM
I've just started ASP and I've followed examples and books and copied and pasted and tried and retried, but I can't seem to get
this simple script working. It's supposed to just display members
and their details from "users.mdb" in a simple table.
The page is http://www10.brinkster.com/asaakitesting/userslist.asp
Could someone please help here? It seems I've done everything
right but I always get this error when I view my page:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "DRIVER={Microsoft Ac"]'
/asaakitesting/userslist.asp, line 38
Here's the code on my page:
<style>
.t1{
border: 2px solid;
border-color:buttonface;
font-family:verdana;
font-size:12;
text-align:center;
}
.th{
background-color: pink;
font-weight:bold;
color:darkred;
text-align:center;
}
.tb {
background-color:lightgreen;
color:black;
text-align:center;
}
</style>
<BR><BR><BR>
<center>
<table class="t1" cellpadding="3" cellspacing="5">
<THEAD> <TR> <TD class="th"> UserId </TD>
<TD class="th"> UserName </TD>
<TD class="th"> Password </TD>
<TD class="th"> EmailAddy </TD>
</TR></THEAD>
<TBODY>
<%
Dim rsUsers
Dim strConn
Dim oConn
Dim strSql
'Set rsUsers = Server.CreateObject("ADODB.Recordset")
Set strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\asaakitesting\db\users.mdb")
'Set strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("\asaakitesting\db\users.mdb") & ";" & "Persist Security Info=False"
Set strSql = "SELECT MemberListID, UserName, Password, EmailAddress FROM Members"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open(strConn)
Set rsUsers = oConn.Execute(strSql)
While Not rsUsers.EOF
Response.Write "<TR><TD class='tb'>" & rsUsers("MemberListID").Value & " </TD><TD class='tb'> " & rsUsers("UserName").Value & " </TD><TD class='tb'> " & rsUsers("Password").Value & " </TD><TD class='tb'> " & rsUsers("EmailAddress").Value & " </TD></TR>"
rsUsers.MoveNext
Wend
oConn.Close
Set rsUsers = Nothing
Set oConn = Nothing
%>
</TBODY>
</TABLE>
</CENTER>
oh please oh please oh please ... i'm sure it's just a silly little mistake
this simple script working. It's supposed to just display members
and their details from "users.mdb" in a simple table.
The page is http://www10.brinkster.com/asaakitesting/userslist.asp
Could someone please help here? It seems I've done everything
right but I always get this error when I view my page:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "DRIVER={Microsoft Ac"]'
/asaakitesting/userslist.asp, line 38
Here's the code on my page:
<style>
.t1{
border: 2px solid;
border-color:buttonface;
font-family:verdana;
font-size:12;
text-align:center;
}
.th{
background-color: pink;
font-weight:bold;
color:darkred;
text-align:center;
}
.tb {
background-color:lightgreen;
color:black;
text-align:center;
}
</style>
<BR><BR><BR>
<center>
<table class="t1" cellpadding="3" cellspacing="5">
<THEAD> <TR> <TD class="th"> UserId </TD>
<TD class="th"> UserName </TD>
<TD class="th"> Password </TD>
<TD class="th"> EmailAddy </TD>
</TR></THEAD>
<TBODY>
<%
Dim rsUsers
Dim strConn
Dim oConn
Dim strSql
'Set rsUsers = Server.CreateObject("ADODB.Recordset")
Set strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\asaakitesting\db\users.mdb")
'Set strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("\asaakitesting\db\users.mdb") & ";" & "Persist Security Info=False"
Set strSql = "SELECT MemberListID, UserName, Password, EmailAddress FROM Members"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open(strConn)
Set rsUsers = oConn.Execute(strSql)
While Not rsUsers.EOF
Response.Write "<TR><TD class='tb'>" & rsUsers("MemberListID").Value & " </TD><TD class='tb'> " & rsUsers("UserName").Value & " </TD><TD class='tb'> " & rsUsers("Password").Value & " </TD><TD class='tb'> " & rsUsers("EmailAddress").Value & " </TD></TR>"
rsUsers.MoveNext
Wend
oConn.Close
Set rsUsers = Nothing
Set oConn = Nothing
%>
</TBODY>
</TABLE>
</CENTER>
oh please oh please oh please ... i'm sure it's just a silly little mistake