scripter73
Programmer
Hi,
I have some variables in my ASP script that I would like to insert as a record into my database table called ALOG. The table layout/datatypes are as follows:
Host_Addr (Text)
UserID (Text)
LogDate (Date/Time)
LogTime (Text)
RefURL (Text)
OpSysURL (Text)
The variables I want to insert are:
strHost(string)
strUser (string)
datDate (date)
strFinalTime (string)
strRefURL (string)
strOpSys (string)
I receiving this error when I attempt to update the database,
ADODB.Field error '800a0cb3'
The operation requested by the application is not supported by the provider.
/logs/split.asp, line 631
Here's my snippet of code (sorry it's so long):
'**************************
'OPEN DATABASE CONNECTION
'**************************
'create connection to database using dsn
dim adopenforwardonly, adlockreadonly, adcmdtable
adopenforwardonly = 0
adlockreadonly = 1
adcmdtable = 2
dim objconn, objrs
set objconn = server.createobject("ADODB.Connection"
set objrs = server.createobject("ADODB.Recordset"
dim strdatabasetype
strdatabasetype = "Access"
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=d:\inetpub\ &_
"Persist Security Info=False"
objrs.open "Alog", objconn, adopenforwardonly, adlockreadonly, adcmdtable
'add new record using no argument
objrs("Host_Addr" = strHost 'line 631
objrs("UserID" = strUser
objrs("LogDate" = datDate
objrs("LogTime" = strFinalTime
objrs("RefURL" = strRefURL
objrs("OpSysURL" = strOpSys
objrs.Update
objrs.close
objconn.close
set objrs = nothing
set objconn = nothing
Thanks in advance!
scripter73
I have some variables in my ASP script that I would like to insert as a record into my database table called ALOG. The table layout/datatypes are as follows:
Host_Addr (Text)
UserID (Text)
LogDate (Date/Time)
LogTime (Text)
RefURL (Text)
OpSysURL (Text)
The variables I want to insert are:
strHost(string)
strUser (string)
datDate (date)
strFinalTime (string)
strRefURL (string)
strOpSys (string)
I receiving this error when I attempt to update the database,
ADODB.Field error '800a0cb3'
The operation requested by the application is not supported by the provider.
/logs/split.asp, line 631
Here's my snippet of code (sorry it's so long):
'**************************
'OPEN DATABASE CONNECTION
'**************************
'create connection to database using dsn
dim adopenforwardonly, adlockreadonly, adcmdtable
adopenforwardonly = 0
adlockreadonly = 1
adcmdtable = 2
dim objconn, objrs
set objconn = server.createobject("ADODB.Connection"
set objrs = server.createobject("ADODB.Recordset"
dim strdatabasetype
strdatabasetype = "Access"
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=d:\inetpub\ &_
"Persist Security Info=False"
objrs.open "Alog", objconn, adopenforwardonly, adlockreadonly, adcmdtable
'add new record using no argument
objrs("Host_Addr" = strHost 'line 631
objrs("UserID" = strUser
objrs("LogDate" = datDate
objrs("LogTime" = strFinalTime
objrs("RefURL" = strRefURL
objrs("OpSysURL" = strOpSys
objrs.Update
objrs.close
objconn.close
set objrs = nothing
set objconn = nothing
Thanks in advance!
scripter73