Need help : DSN connection string

T

Tee

Hi,

I need some help here for DSN connection string.
I know it's not recommended to use DSN, even I dont like it as well ...
but for now, my situation is I am using a shared hosting. I do not have
write access to my web root folder, I have a folder specialy for database.
I am currently using access, it is just for testing purpose.

here's the info:

ms access database password : testdb
dsn name : testdb

can anyone tell me what is the connection string ?

thanks,
Tee
 
D

Dino Chiesa [Microsoft]

You don't need write access to c:\, to use DSN-less connection strings.

To see sample connection strings, try
www.connectionstrings.com

eg,
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\dbdir\dbfile.mdb;User
Id=whatever;Password=testdb;"
 
T

Tee

I know about DNS less connection string ... but now the problem is the
database folder is not inside the wwwroot ...
if I really have to get to that folder, I must use ../db/dbfile.mdb ...
but now another problem comes, I cannot exit the top root by using ../ ...
and if I place the database inside my wwwroot folder, I don't have write
access. I need write data to the database as well.

Thanks,
Tee
 
D

Dino Chiesa [Microsoft]

can you not use string manipulation to build the proper folder name?
or Server.MapPath()
or ..

Your hoster maybe has a FAQ somewhere illustrating how to do this on that
site?
-D
 
T

Tee

I am using server.MapPath ... and it really dont let me exit the root by
using ../ ...

as now the the db folder & wwwroot folder are on the same level ... sorry if
you couldn't understand what I meant ...

it is, when I ftp login, I see 2 folder, wwwroot & db ...
so I cannot exit wwwroot and read data in db folder by using ../db/data.mdb
....

please help ...

thanks.
 
K

Kevin Spencer

All you need to do is find out the absolute file path the the .mdb file and
use that. Ask your hosting service if you don't know it.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top