HowardMarks
MIS
Hi guys, could anyone shed any light on this problem, i am relatively inexperienced with ASP and VBScript? All this page is supposed to do is display the entries from an Access Database (which it does just fine), and then add an entry to that same database. Trouble is the addNew function doesnt seem to work, and i get this error:
ADODB.Recordset error '800a0cb3'
The operation requested by the application is not supported by the provider.
/AERO2/displayusers.asp, line 34
Heres the code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<% language=VBScript %>
<%
Dim Connect, userRS, Query
Set Connect = Server.CreateObject("ADODB.Connection"
Connect.Open "users"
Set userRS = Server.CreateObject("ADODB.Recordset"
userRS.CursorType = adOpenDynamic
Query = "SELECT * FROM users"
userRS.Open Query, Connect
do until userRS.EOF
%>
<%=userRS("name"%><BR>
<%=userRS("housenumber"%><BR>
<%=userRS("street"%><BR>
<%=userRS("town"%><BR>
<%=userRS("county"%><BR>
<% userRS.MoveNext
loop %>
<%
userRS.AddNew
userRS("name"="Barbara"
userRS("street"="pittville"
userRS("county"="worcs"
userRS.Update%>
</body>
</html>
Its probably something really simple but i can't work it out! Can anyone help?
Many Thanks,
Nick
Nick (Web Designer)
nick.price@misuk.net
ADODB.Recordset error '800a0cb3'
The operation requested by the application is not supported by the provider.
/AERO2/displayusers.asp, line 34
Heres the code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<% language=VBScript %>
<%
Dim Connect, userRS, Query
Set Connect = Server.CreateObject("ADODB.Connection"
Connect.Open "users"
Set userRS = Server.CreateObject("ADODB.Recordset"
userRS.CursorType = adOpenDynamic
Query = "SELECT * FROM users"
userRS.Open Query, Connect
do until userRS.EOF
%>
<%=userRS("name"%><BR>
<%=userRS("housenumber"%><BR>
<%=userRS("street"%><BR>
<%=userRS("town"%><BR>
<%=userRS("county"%><BR>
<% userRS.MoveNext
loop %>
<%
userRS.AddNew
userRS("name"="Barbara"
userRS("street"="pittville"
userRS("county"="worcs"
userRS.Update%>
</body>
</html>
Its probably something really simple but i can't work it out! Can anyone help?
Many Thanks,
Nick
Nick (Web Designer)
nick.price@misuk.net