Click to See Complete Forum and Search --> : ADODB.Recordset error '800a0bb9'


gabrielgv
03-07-2006, 07:38 PM
Hi:

I'm programming an asp and I get an error when I try open a recordset

this is the error that shows the browser

--------------------------------------------------------------------------
ADODB.Recordset error '800a0bb9'

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

/digital/pruebaASPguarda.asp, line 20

--------------------------------------------------------------------------

this is my code

--------------------------------------------------------------------------

Dim cn
Dim rs
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")


cn.ConnectionString="Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath("Sada.mdb")
cn.Open
rs.Open "RecursosHumanos", cn, adOpenKeyset, adLockOptimistic 'this is the line 20
rs.AddNew
rs.Fields("Nombre").Value ="lskdjf"
rs.Update
rs.Close
Set rs=Nothing
cn.Close
--------------------------------------------------------------------------


the asp is hosted in a windows 2003 server and IIS 6.0


What could be wrong?

What can I do?

Thanks!!

Master Shake
03-09-2006, 03:51 PM
rs.Open "RecursosHumanos", cn, adOpenKeyset, adLockOptimistic 'this is the line 20

one thing that can cause this error is not having the ado vars defined. Are you including adovbs.inc? If not go get that file and include it and that should take care of it, or just use the numbers in place of the vars. Also, if you use 'option explicit' it should tell you that a var is undefined.

Master Shake