I'm having trouble to integrate Site News into my website. I cannot connect to my database as I would like. I'm using a virtual path to my database. (d:\www\websitename\database\news.mdb). WebWizNews uses a connection with server.MapPath, but i'm not familiar with that. Can anyone tell me how I can connect to my database using a virtual path.
-----------------------------------
'Create database connection
'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below --------------
'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("news.mdb")
'Database driver info for Brinkster
'strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/news.mdb") 'This one is for Brinkster users place your Brinster username where you see USERNAME
'Alternative drivers faster than the basic one above
'strCon = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath("news.mdb") 'This one is if you convert the database to Access 97
'strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("news.mdb") 'This one is for Access 2000/2002
'If you wish to use DSN then comment out the driver above and uncomment the line below (DSN is slower than the above drivers)
'strCon = "DSN = DSN_NAME" 'Place the DSN where you see DSN_NAME
---------------------------
Or can anyone tell me how I use Server.Mappath to connect to my database who is outside my webroot. (The webserver uses a database folder and a www folder)
thanks a lot.....