•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,269 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,711 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 6947 | Replies: 1
![]() |
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I have a problem entering data into my database using asp and vb scripting languages
web site address = http://www.ilizarovgrp.co.uk/
i have tried adding a advobs inc file but the page will not display once this is added this may be because of my server options but i thought asp was a free usage language.
I can already read stuff from the database which is a access file but cannot enter info using the adLockOptimistic option in the connection because i keep getting the error (above in title) which says
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Line 49 highlighted below
if anyone has any advice or can say why i cannot add the advobs inc file to my page i would be greatful. The web host is fasthosts and i am using a simple asp server system along with access file storage database.
<%@Language=VBScript%>
<% Option Explicit %>
<table width="701" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="127"><font color="#993399" size="+2"><strong>Title</strong></font></td>
<td width="233"><font color="#993399" size="+2"><strong>Description</strong></font></td>
</tr>
<%
Dim objConn
Dim adlockoptimistic
Dim adCmdTable
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\ilizarovdata.mdb")
objConn.Open
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "ilizarov", objConn, , adLockOptimistic, adCmdTable
objRS.AddNew
objRS ("name")= Request.Form ("ilizarname")
objRS ("comment") = Request.Form ("fmcomments")
objRS.Update
objRS.MoveFirst
Do while Not objRS.EOF
Response.Write"<tr><td>"&objRS("name")& "</td>"
Response.Write "<td>"&objRS("comment")& "</td>"
objRS.MoveNext
loop
objRS.close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</table>
web site address = http://www.ilizarovgrp.co.uk/
i have tried adding a advobs inc file but the page will not display once this is added this may be because of my server options but i thought asp was a free usage language.
I can already read stuff from the database which is a access file but cannot enter info using the adLockOptimistic option in the connection because i keep getting the error (above in title) which says
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Line 49 highlighted below
if anyone has any advice or can say why i cannot add the advobs inc file to my page i would be greatful. The web host is fasthosts and i am using a simple asp server system along with access file storage database.
<%@Language=VBScript%>
<% Option Explicit %>
<table width="701" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="127"><font color="#993399" size="+2"><strong>Title</strong></font></td>
<td width="233"><font color="#993399" size="+2"><strong>Description</strong></font></td>
</tr>
<%
Dim objConn
Dim adlockoptimistic
Dim adCmdTable
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\ilizarovdata.mdb")
objConn.Open
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "ilizarov", objConn, , adLockOptimistic, adCmdTable
objRS.AddNew
objRS ("name")= Request.Form ("ilizarname")
objRS ("comment") = Request.Form ("fmcomments")
objRS.Update
objRS.MoveFirst
Do while Not objRS.EOF
Response.Write"<tr><td>"&objRS("name")& "</td>"
Response.Write "<td>"&objRS("comment")& "</td>"
objRS.MoveNext
loop
objRS.close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</table>
•
•
Join Date: Sep 2004
Location: Plymouth, UK
Posts: 79
Reputation:
Rep Power: 4
Solved Threads: 1
Hello,
You havent entered any cursor type for the recordset. You try the following line.
objRS.Open "ilizarov", objConn,adOpenDynamic , adLockOptimistic, adCmdTable
I think by default it take adOpenForwardOnly cursor tyep which conflicts if you try to enter the record in the data base using the add method.
Here is the the general form of opening a recordset.
objRS.Open source, connection, [cursortype], [locktype], [options]
You havent entered any cursor type for the recordset. You try the following line.
objRS.Open "ilizarov", objConn,adOpenDynamic , adLockOptimistic, adCmdTable
I think by default it take adOpenForwardOnly cursor tyep which conflicts if you try to enter the record in the data base using the add method.
Here is the the general form of opening a recordset.
objRS.Open source, connection, [cursortype], [locktype], [options]
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
- Bind ListBox to ADODB.Recordset (Visual Basic 4 / 5 / 6)
- ADODB.Field error '80020009' (ASP)
- ADODB.Recordset (0x800A0E78):Operation is not allowed when the object is closed. (ASP)
- Exporting Problem (Visual Basic 4 / 5 / 6)
- problem with ADODB.Field error '80020009' (ASP)
- ADODB.Recordset error '800a0bb9' (ASP)
- Problem Bridge.dll error & Freeze at Desktop (Viruses, Spyware and other Nasties)
- "ADODB Recordset error" (ASP)
Other Threads in the ASP Forum
- Previous Thread: Small date problem
- Next Thread: ASP File Publish in PHP server


Linear Mode