Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Update Acting Up Again

Status
Not open for further replies.

scripter73

Programmer
Apr 18, 2001
421
US
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
 
try making sure that your ISP is using the most up to date version of OLEDB... i know that 97 shipped with 3.51, and from your code you are using 4.0.

that could be your problem.

go to
if you need to dl a newer OLEDB.
 
Thanks for your response. I really appreciate it.

I'm not really using an ISP since I'm working from my office. Are you saying that since my company's server has Access 97 and is using the 3.51 MS Jet Engine, maybe I should upgrade it to Access 2000 which uses the 4.0 Jet Engine? I don't mind trying that, but what about if I just reference in my ASP script:

objconn.open "Provider=Microsoft.Jet.OLEDB.3.51;"? I tried that and I'm still getting an error.

I think you're right about the Jet Engine versions, though? But why would it have worked before?

Thanks,
scripter73
 
I'm not sure how backwards compatible the OLEDB providers are, since 2000 uses 4.0 and 97 uses 3.51 (i'm not totally sure if it's 3.51 or 3.57, or something like that, since I've never used Access 97 OLE DB, but I do know it's 3.5x)

the weird thing is that you are able to get it to work for 60 some records, if there was really a problem with the providers, i don't see why OLE DB would let you do 60 records then error out on you...

if the OLE DB doesn't work - then i'm all out of ideas.

good luck to you
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top