scripter73
Programmer
Hi,
I had been having problems about 3 weeks ago with updating an Access 2000 database using ASP but the issue was solved (though with alot of frustration ). I'm trying to convince my boss to switch to SQL Server, but meanwhile I'm stuck.
My ASP script is designed to read a .TXT file, do some basic data manipulations, and open an Access db and write the data to the table. Like I said at one point in time, my script successfully updated the database, but a few things occurred:
- Network people switched my machine and also my NT userid and password changed.
- I currently have Access 2000 on my machine and it was installed when my code worked, but the server that I upload my DB and ASP script to only has Access 97. There may be an issue there that I don't know about. Anyway, I created my DB in Acc 2000 and uploaded it to the server.
Here's a little background. I'm able to read a few records and actually write them to the database, but after I try to read record# 63 or 64, I get the following error: Microsoft Jet Database Engine error 80004005. Unspecified error."
Here's my database connection code from my script:
'********************************************************
'OPEN DATABASE CONNECTION - write data to database
'********************************************************
'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"
'line 461
dim strdatabasetype
strdatabasetype = "Access"
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_ (debugger doesn't like this line)
"Data Source=d:\inetpub\ &_
"Persist Security Info=False"
objrs.open "Alog", objconn, adopenforwardonly, adlockreadonly, adcmdtable
'add new record
'check to make sure file data to upload is from CONNECT or DOMINO log file
if (strcomp(filechars, "NC" = 0) OR (strcomp(filechars, "AC"=0) then
strSQL = "INSERT INTO Alog (Host_Addr, UserID, LogDate, LogTime, LogRequest, RefURL, OpSysURL) VALUES ('" & _
strHost &"'," & "'" & strUser & "'," & "'" & datDate &"','" & strFinalTime & "','" & strRequest & "'," & "'" & strRefURL & "'," & "'" & strOpSys & "')"
objConn.Execute strSQL
end if
The debugger complains about this line:
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_.
Is there some reason why it would work perfectly before and not now? I have a feeling it may have to do with my machine conversion.
Please help. I'm more than a little frustrated thinking that I now have to go through what I went through a few weeks back. I appreciate any assistance to you can give.
Thanks,
scripter73
I had been having problems about 3 weeks ago with updating an Access 2000 database using ASP but the issue was solved (though with alot of frustration ). I'm trying to convince my boss to switch to SQL Server, but meanwhile I'm stuck.
My ASP script is designed to read a .TXT file, do some basic data manipulations, and open an Access db and write the data to the table. Like I said at one point in time, my script successfully updated the database, but a few things occurred:
- Network people switched my machine and also my NT userid and password changed.
- I currently have Access 2000 on my machine and it was installed when my code worked, but the server that I upload my DB and ASP script to only has Access 97. There may be an issue there that I don't know about. Anyway, I created my DB in Acc 2000 and uploaded it to the server.
Here's a little background. I'm able to read a few records and actually write them to the database, but after I try to read record# 63 or 64, I get the following error: Microsoft Jet Database Engine error 80004005. Unspecified error."
Here's my database connection code from my script:
'********************************************************
'OPEN DATABASE CONNECTION - write data to database
'********************************************************
'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"
'line 461
dim strdatabasetype
strdatabasetype = "Access"
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_ (debugger doesn't like this line)
"Data Source=d:\inetpub\ &_
"Persist Security Info=False"
objrs.open "Alog", objconn, adopenforwardonly, adlockreadonly, adcmdtable
'add new record
'check to make sure file data to upload is from CONNECT or DOMINO log file
if (strcomp(filechars, "NC" = 0) OR (strcomp(filechars, "AC"=0) then
strSQL = "INSERT INTO Alog (Host_Addr, UserID, LogDate, LogTime, LogRequest, RefURL, OpSysURL) VALUES ('" & _
strHost &"'," & "'" & strUser & "'," & "'" & datDate &"','" & strFinalTime & "','" & strRequest & "'," & "'" & strRefURL & "'," & "'" & strOpSys & "')"
objConn.Execute strSQL
end if
The debugger complains about this line:
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;" &_.
Is there some reason why it would work perfectly before and not now? I have a feeling it may have to do with my machine conversion.
Please help. I'm more than a little frustrated thinking that I now have to go through what I went through a few weeks back. I appreciate any assistance to you can give.
Thanks,
scripter73