Click to See Complete Forum and Search --> : HELP - ADO problem has me stumped.


J. Giudice
10-12-2000, 10:16 PM
Folks - I am trying to learn to use ASP and web pages to build a new
application. I know it is about time to learn more about all this great web
stuff. I am pretty experenced building with VB, but I am about to kell my
computer with this ASP stuff.

Here is the status so far. I am stumped on how to add records to a database
I have. I can read records fine using ADO and recordset. But my attempts to
add fail.

Here is the code I am using:

'Create and Open Recordset Object
src = "C:\My Documents\Avire2\dbwebsite.mdb"
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & src
set objConn = server.createobject("ADODB.Connection")
objconn.open strconnString

set rs = server.createobject("adodb.recordset")
rs.activeconnection = objConn
rs.cursorType = adOpenKeySet

'Here is where I start get failures
rs.CursorLocation = adUseClient
response.write("RS LockType is " & rs.locktype)
Rs.LockType = adLockOptimistic
rs.Source = "Features"
rs.open

I have tried cutting a pasting from the MSDB documents.
I have taken out the rs.cursorLocation statement.
Then the failure occurs on Rs.Locktype.

If I take out both the rs.addNew statement later in the code fails.

The error message I get is:

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

/avire/feature_process.asp, line 18

My development system is a Win98 SE with PWS installed. I am using an Access
database (Access 2000)

Can anyone direct me to how to get this to work?

Thanks and Regards

John G.