I am having difficulty with some asp where I am trying to add a record to a database.
My errors come on two levels:
(1) If I use OPTION EXPLICIT I get "Variable is undefined: 'adModeReadWrite' ",
(2) If I don't use OPTION EXPLICIT I get "ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." from line ** instead.
Here's my problem code:
Dim Conn, RS, DSNName, sql
Set Conn = Server.CreateObject ("ADODB.Connection")
Conn.Mode = adModeReadWrite
DSNName = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="
DSNName = DSNName & Server.MapPath("/Dbimages.mdb")
Set RS = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * from Images"
** RS.Open sql, Conn, adOpenStatic, adLockPessimistic
RS.Fields ("Filename") = Request.Form("UpFile")
RS.Fields ("Category") = Request.Form("UpCat") etc. adding more fields to a database from a form...