Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: DSN-less Connections


Message #1 by "Brian S. VanDyke" <gemynd@h...> on Wed, 7 Mar 2001 18:30:26
I have a problem where I cannot use a DSN entry for a connection. I also 

cannot get the server administrator to let me have the path to the 

database. Is there a way to get a connection without either a DSN or a 

directory path?



Thanks for the help.



Brian S. VanDyke

gemynd@h...
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 8 Mar 2001 14:14:38 +1100

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

: I have a problem where I cannot use a DSN entry for a connection. I also

: cannot get the server administrator to let me have the path to the

: database. Is there a way to get a connection without either a DSN or a

: directory path?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



What type of database? If it's SQL Server you can just use the DB server

name or IP address.



If it's something like Access, and the DB file is within the WWW root, then

you can use Server.Mappath() to get the physical path for a virtual path.



Another thing that could be quite sneaky is to write something using the

File System Object to go looking around the server's folders for the file...



Cheers

Ken





Message #3 by "John.Brown" <john.brown@c...> on Thu, 8 Mar 2001 03:16:30 +1300
How do you change the Server.Mappath() for a database that is has its own

directory and therefore not in the WWW root ?



Thanks - John

----- Original Message -----

From: Ken Schaefer <ken@a...>

To: ASP Database Setup <asp_database_setup@p...>

Sent: Thursday, March 08, 2001 4:14 PM

Subject: [asp_database_setup] Re: DSN-less Connections





>

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> : I have a problem where I cannot use a DSN entry for a connection. I also

> : cannot get the server administrator to let me have the path to the

> : database. Is there a way to get a connection without either a DSN or a

> : directory path?

>

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>

> What type of database? If it's SQL Server you can just use the DB server

> name or IP address.

>

> If it's something like Access, and the DB file is within the WWW root,

then

> you can use Server.Mappath() to get the physical path for a virtual path.

>

> Another thing that could be quite sneaky is to write something using the

> File System Object to go looking around the server's folders for the

file...

>

> Cheers

> Ken

>

>
Message #4 by "Ken Schaefer" <ken@a...> on Fri, 9 Mar 2001 10:14:17 +1100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

: How do you change the Server.Mappath() for a database

: that is has its own directory and therefore not in the WWW root ?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Is the folder underneath the WW root?

In that case, Server.Mappath() accepts a string, which is the path from the

root, so if the DB was in the root you supply the string "/". If it's in a

folder called "something" underneath the root then you supply "/something/"



Cheers

Ken






  Return to Index