Newbie: Database connection question

G

Guest

Hello,

If I have a database that sits in a shared folder
\\MOTIV8\IPS_DB\Northwind.mdb do I need to authenticate myself to the server
before I can make a connection to this database through my VB.Net
application? I ask because folks who aren't members of this server will need
to access this database via the program I am writing in VB.Net and I don't
want them to experience connection errors to the database.

The connectionString I am using now looks like this:

connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=\\MOTIV8\IPS_DB\Northwind.mdb;" & "Jet OLEDB:Database
Password=abc123"

I am currently able to connect to the database without a problem. I think
this is because I have already logged into the Network.

Since the \\MOTIV8 server has IIS installed on it. Is there a better way to
setup the database so people won't run into connection errors? Does it make
more sense to setup a systemDSN for this database? If I setup a systemDSN do
I use the same connectionString as I would for a local connection?

Any suggestions would be greatly appreciated.

Cheers,

devin
 
W

William Ryan

If they don't have access to the share, you'll either need to pass network
credentials or grant them the premissions. Remember that Access isn't a
'client/server' database, so your essentially in basic file IO (excluding
Access' permissioning). Hence, if I can't access the share, then I can't
access the mdb. Since you reference IIS, I'm guessing people oustide the
trusted domain are going to access this (ie the web) vs. just sharing it on
the network? If so, point the virtual directory to it, and make sure the
permissions are set so it can be accessed accordingly. IMHO, if this is a
web app, get rid of Access and use MSDE instead, it gives you a lot more
power, won't corrupt as easily and is much more secure.

I'm not sure which scenario you are under but I'm guessing it's the IIS like
I mentioned. If you put fake.txt on the server, can your app open fake.txt?
that'd be the first thing I'd check.

HTH,

Bill
 
G

Guest

Howdy Bill,
If they don't have access to the share, you'll either need to pass network
credentials or grant them the premissions.

I've done some poking around on the web trying to locate some information
about sending network credential information through my vb.net desktop app
and I couldn't locate a whole lot of info.

Remember that Access isn't a 'client/server' database, so your essentially in basic file IO (excluding
Access' permissioning). Hence, if I can't access the share, then I can't
access the mdb.

Gotcha. This makes sense. I wish I the company had SQL Server setup, this
would be much easier I think.

Since you reference IIS, I'm guessing people oustide the
trusted domain are going to access this (ie the web) vs. just sharing it on
the network? If so, point the virtual directory to it, and make sure the
permissions are set so it can be accessed accordingly.

The application I am writing is a desktop app written using vb.net. The
database where I am going to be storing and retriving client information is
located on a network share. The machine that holds the network share has IIS
installed on it. Is it possible to connect to a .mdb file through IIS using
a vb.net app or do I need to try another approach?

I'm not sure which scenario you are under but I'm guessing it's the IIS like
I mentioned. If you put fake.txt on the server, can your app open fake.txt?
that'd be the first thing I'd check.

Thanks for the excellent suggestions Bill. I will speak with the folks who
run the server tomorrow to see if they can shed any more light on this
subject.

best regards,

devin
 

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

Top