I'm new to ASP, and I'm trying to teach my self a few things about it etc. Anyway, the first problem I come up against...Access 2002 database, and getting ASP to talk to it.
I have downloaded ready made scripts in the past from hotscripts, and non of them have ever been able to talk to access, no matter what I did or tried, and now I have given up on trying to get it fixed, and admitted defeat against it. So, I hope someone can help. I'll include everything, just to be comprehensive.
<table width="620" height="500">
response.write formatdatetime (time, vbshorttime)
response.write formatdatetime (date, vblongdate)
Dim DB, RS
set DB = Server.CreateObject("adoDB.connection")
DB.mode = admodereadwrite
DB.provider = "microsoft.jet.oledb.4.0"
DB.connectionstring = server.mappath("db1.mdb")
Set RS = Server.CreateObject("adoDB.recordset")
RS.Open "table1", DB, adOpenKeySet, adLockReadOnly, adCmdTable
If RS.BOF and RS.EOF Then
Response.Write "<p align='center'>Sorry, no files!</p>"
While Not RS.EOF
Response.Write RS("name")& "<BR>"
Head.asp, menu.asp and foot.asp don't contain any conflict script (that I can see)(head has a simple 'number of users online' script, and menu has a links list from a text file) foot doesn't have any ASP at all. I can post if needed.
This script was supposed to be a simple, get you off the start line kind of thing, and I hoped it would work after all of my bungled attempts with HotScripts ready-mades.
The database is a very simple, 'Open access, make database, select directory, make 1 column, close database', no passwords were added, and nothing specific was added. I have attached the database, just in case (so nobody has to ask for it), but it's bare, no data at all, just a column name.
I seriously believe that I have a problem with my machine, or OS setup or IIS setup, if you agree, please let me know.
I'm really desparate here, and if anyone can point me in the right direction for more tutorials on programming in VBScript as well, I'd be most grateful.
The problem is basically related to the MDAC version. If you recently rebooted from the "Last Known Good Configuration" menu in XP then that is likely the cause. You basically have to reload all your dll's which is quite a pain. This article describes the procedure pretty well.
One NOTE - I could not get the method the author suggests for replacing the dll's to work. I had to boot into safe mode before replacing the files in both places. You can click F8 before the windows splash screen to boot into safe mode.
That's right, Ihad to go back to the "Last Known Good Configuration" couple of weeks ago, dont know why, I had a worm attack that week as well, maybe thats related? I will look into this, thanks a lot.