Oppenhiemer
Programmer
Hi -
Just wondering if anyone knew how to obtain a local path from a network resource ? I have seen code that enabled you to iterate through various network shared resources - but I need to obtain the Local reference once found.
If I come across say a shared drive, how can I extract its local reference ? That is local to the machine that owns the drive (resource.)
It may sound like an odd thing to need to do, but its related to automating an interbase-based application start-up procedure. I am trying to create a start-up procedure that allows the software to check if its connected to the database - if not, then call a form to let the user select the datasource from the network.
Now browsing the network, i can easily let them select a drive or folder. But (if my understanding is correct for a TCP/IP protocol) then I need to be able to provide connection information for the database in the format :
<server_name>:<path>
For example :
Narnia:\DbDir\ThisDb.gdb
But (and here lies the problem) the path needs to be as seen from the hosts perspective (not a mapped resource assigned letter.)
So if I could locate the network drive(path) is there anyway to extract the local path information so I can use it in the INterbase Connection string ?
As far as I know, I cannot use a UNC reference when connecting to interbase over TCP/IP. Anyway, any pointers welcome ;-).
Cheers..
Opp.
Just wondering if anyone knew how to obtain a local path from a network resource ? I have seen code that enabled you to iterate through various network shared resources - but I need to obtain the Local reference once found.
If I come across say a shared drive, how can I extract its local reference ? That is local to the machine that owns the drive (resource.)
It may sound like an odd thing to need to do, but its related to automating an interbase-based application start-up procedure. I am trying to create a start-up procedure that allows the software to check if its connected to the database - if not, then call a form to let the user select the datasource from the network.
Now browsing the network, i can easily let them select a drive or folder. But (if my understanding is correct for a TCP/IP protocol) then I need to be able to provide connection information for the database in the format :
<server_name>:<path>
For example :
Narnia:\DbDir\ThisDb.gdb
But (and here lies the problem) the path needs to be as seen from the hosts perspective (not a mapped resource assigned letter.)
So if I could locate the network drive(path) is there anyway to extract the local path information so I can use it in the INterbase Connection string ?
As far as I know, I cannot use a UNC reference when connecting to interbase over TCP/IP. Anyway, any pointers welcome ;-).
Cheers..
Opp.