Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: ConnectionString Trick using FrontPage on IIS5


Message #1 by "Antonio Paulo Leme" <paulo.leme@u...> on Thu, 18 Oct 2001 23:40:34
Usually when the asp code is executed:



Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open "DRIVER={Microsoft Access Driver 

(*.mdb)};DBQ=URL=db1.mdb;UID=Admin;PWD="



The server returns the error:



Microsoft OLE DB Provider for ODBC Drivers (0x80004005)...

...'Temporary (volatile) Jet DSN for process 0x??? Thread 0x???...



The reason for this error is that the user does not have writing 

permissions on the server (NTFS folder). But if I upload the Access file 

(*.mdb) using the FrontPage, and accepting the option to create a 

Connection, FP creates a connection string on Global.asa (ex.: Application

("DB_ConnectionString")) and now, in any asp page is possible to open the 

database with writing permissions using the code:



Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open Application("DB_ConnectionString").



My problem is that I can't use a global.asa file, because the server runs 

the McAfee Antivirus, and each time it is executed a Response.Redirect, 

the server recompiles global.asa (due to the antivirus scanning) resulting 

an error.(The server administrator will not disable the scanning, and 

please: do not ask me why)



Does anybody can explain (in deep) what is the trick that FP uses? 





Message #2 by "Ken Schaefer" <ken@a...> on Fri, 19 Oct 2001 18:15:00 +1000
I think your connection string is faulty:

DBQ=URL=db1.mdb

is not valid as part of a connection string AFAIK



It should be DBQ=path_to_database eg

DBQ=db1.mdb



Cheers

Ken




  Return to Index