Forum Moderators: mack

Message Too Old, No Replies

database on mapped drive

         

gr8diy

10:09 pm on Jul 11, 2005 (gmt 0)

10+ Year Member



Can aaanyone help or guide me in this area
I want to link to a database

I am currently using a mapped drive to store my data
so in my programming i can Name it as z: drive

is this the way to go or is there a better method

also the above works fine except when i lose a network connection and then the mapped drive is not available, I understand that this will happen when on a different pc but it also happens when the mapped drive is on the actual pc that the data is on!
er? does that make sense? i have data in a folder on a pc, I assign this folder as a mapped drive on the same pc and when i lose a network connection to a totally different pc I lose the mapped drive on the pc with the data folder on it
any help at all will be very much apprieciated
thanks

mack

10:28 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



How large will your data drive need to be? For small amounts of data a USB pen drive may be a good idea, for larger data sets an external disk drive that you can take from pc to pc might also be an idea.

As for network drives, I think this is a good way to go. Local network storage can to very reliable, it all comes down to the hardware and software you use to run your lan.

Mack.

gr8diy

11:54 am on Jul 13, 2005 (gmt 0)

10+ Year Member



Thanks for your help but i think you have misunderstood what i am after
I want to access data over a network( wired and wireless)
at the moment I am using a mapped drive to do this.
One of the pcs the one i use most often and is therefore most critical holds the database in a folder,
on this same pc i have a application that uses a mapped drive to this folder
The problem arises when my network is disconnected for whatever reason, then The pc with the data on can not use the mapped drive even though its on the same pc
Hope this is a bit more clear
thanks graham

alex77

11:48 pm on Jul 20, 2005 (gmt 0)



Have you tried using the UNC path from the application instead of a mapped drive? Like, \\server\share instead of z:\.

I've run into various problems with windows and network shares, especially when trying to use different accounts it's a nuisance. You can make a startup script for your application which is ensuring the network connection before launching. Create a text file and change the extension to ".cmd". Then put there:


@echo off
net use \\<server>\<share> /DELETE
net use \\<server>\<share> /USER:<username> <password>
<yourapplication>

This will ensure that the UNC path is available with the appropriate user before launching the actual application. If you want to stick to the mapped drive, use

net use z: \\<server>...
in line 3.