M
middletree
I'm having a hard time finding out why I'm getting this error. Seems to work
just fine on another site I built. I went to ASPFAQ.com, Microsoft.com, and
some other sites. Have not been able to spot the problem yet.
Very simple code:
First, the connection:
strConnection ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="&server.mappath(".\**.mdb")&";User Id=***;Password=***;"
filePath = Server.MapPath("***.mdb")
Next, the code, which queries one table in an Access database, and pulls a
city, state, name, and phone number, all of which are of type Memo:
<% Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString = strConnection
objConnection.Open
strSQL = "select State, City, BranchID, Phone, BranchName from CMMain "
set RS = objConnection.execute (strSQL)
RS.Open strSQL, objConnection,1,1
If Not RS.EOF Then
Do While not rs.EOF
strState = rs("State")
strCity = rs("City")
strBranchID = rs("BranchID")
strPhone = rs("Phone")
strBranchName = rs("BranchName")
%>
<tr>
<td>
<%=strBranchName%>
</td>
<td>
<%=strCity%>
</td>
<td>
<%=strState%>
</td>
<td>
<%=strPhone%>
</td>
</tr>
<%Response.Clear()
Loop
End if
set rs = nothing
set ObjConnection = nothing
%>
just fine on another site I built. I went to ASPFAQ.com, Microsoft.com, and
some other sites. Have not been able to spot the problem yet.
Very simple code:
First, the connection:
strConnection ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="&server.mappath(".\**.mdb")&";User Id=***;Password=***;"
filePath = Server.MapPath("***.mdb")
Next, the code, which queries one table in an Access database, and pulls a
city, state, name, and phone number, all of which are of type Memo:
<% Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString = strConnection
objConnection.Open
strSQL = "select State, City, BranchID, Phone, BranchName from CMMain "
set RS = objConnection.execute (strSQL)
RS.Open strSQL, objConnection,1,1
If Not RS.EOF Then
Do While not rs.EOF
strState = rs("State")
strCity = rs("City")
strBranchID = rs("BranchID")
strPhone = rs("Phone")
strBranchName = rs("BranchName")
%>
<tr>
<td>
<%=strBranchName%>
</td>
<td>
<%=strCity%>
</td>
<td>
<%=strState%>
</td>
<td>
<%=strPhone%>
</td>
</tr>
<%Response.Clear()
Loop
End if
set rs = nothing
set ObjConnection = nothing
%>