Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Connection Problems
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

EvilAndy
Starting Member

Australia
46 Posts

Posted - 06 July 2001 :  10:01:49  Show Profile
I need to know what the correct replacement string should be for the default Ms-Access connection in the config.asp file for the forum software.

I have tried replacing the (c:\inetpub\..)with http://mydomain.com/mydatabase.mdb but this doesn't allow a connection to be made.

The default was working fine on PWS.

strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 97

This Asp stuff is all new to me if ya can't already tell! haha

Thanks in advance.

MorningZ
Junior Member

USA
169 Posts

Posted - 06 July 2001 :  15:03:47  Show Profile  Visit MorningZ's Homepage  Send MorningZ an AOL message
its because on the remote server you more than likely dont have

c:\inetpub\dbroot

you need to either
(1) Figure out what directory it is in
or
(2) Take your http://mydomain.com/mydatabase.mdb and wrap it inside
Server.MapPath( "http://mydomain.com/mydatabase.mdb" )

which will spit out the proper "c:\inetpub\blah\blah\blah"



Go to Top of Page

George_Zhu
Starting Member

China
46 Posts

Posted - 06 July 2001 :  20:50:24  Show Profile  Visit George_Zhu's Homepage
Suggestion:

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("tools/yourdata.mdb") '## MS Access 97/2000 all can use

this is the virtual path.

For example, if the page(index.asp) is http://www.test.com/index.asp and the database is http://www.test.com/inc/mydata.mdb, then the string should be:

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("inc/mydata.mdb") '## MS Access 2000 using virtual path


[color=SlateBlue]Learning is all I want[/color]
Go to Top of Page

EvilAndy
Starting Member

Australia
46 Posts

Posted - 06 July 2001 :  22:44:16  Show Profile
quote:

the remote server more than likely doesn't have

c:\inetpub\dbroot

you need to either
(1) Figure out what directory it is in
or
(2) Take your http://mydomain.com/mydatabase.mdb and wrap it inside
Server.MapPath( "http://mydomain.com/mydatabase.mdb" )





Thanks for that advice, I did manage to find the correct path of the database using an asp page called whereis.asp that was mentioned in a previous posting.

However which is the best method to use? Are there drawbacks to using the first method as opposed to the 2nd?

Thanks Again.

Go to Top of Page

EvilAndy
Starting Member

Australia
46 Posts

Posted - 06 July 2001 :  22:49:27  Show Profile
quote:

Suggestion:

For example, if the page(index.asp) is http://www.test.com/index.asp and the database is http://www.test.com/inc/mydata.mdb, then the string should be:

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("inc/mydata.mdb") '## MS Access 2000 using virtual path


[color=SlateBlue]Learning is all I want[/color]



Thanks for that George, it's working fine.

Go to Top of Page

George_Zhu
Starting Member

China
46 Posts

Posted - 07 July 2001 :  02:16:37  Show Profile  Visit George_Zhu's Homepage
you are welcome

[color=SlateBlue]Learning is all I want[/color]
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07