Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapped drives causing issues

Status
Not open for further replies.

KKit

Technical User
Jun 13, 2007
28
0
0
CA
I have an application that accesses the documents in a particular directory. It works very well. Basic functionality is that the system reads a table, where a file and directory name have previously been stored, then gives the users a choice of files. They can they hit a button that says "open this file", and voila! their file opens in its native program.

The problem lies with networking/mapping the drives.

All files are stored on 1 person's computer in their \my documents folder.

My application stores the directory name of each file in my table.

When person A (who hosts all the files) saves a file name to the database, it saves as c:\documents and settings\etc etc etc.

Persons B & C have their systems mapped to person A's computer. Therefore, when they save a file name it is called "V:\my documents\etc".

But when person A saves an entry into the table, person B & C can not access it. When person B & C stores an entry into the database, person A cannot access it.

Any ideas how I get around these mapping issues?
Thank you.
 
Eureka! I found it! (6 hours later!)

I didn't get any replies, so I assume there may be others that need help with this as well. Here is the solution for anyone that needs it!


Dim wshNetwork
Dim oDrives
Dim oPrinters
Dim ii As Integer
Dim strTEMP As String
Set wshNetwork = CreateObject("WScript.Network")
Set oDrives = wshNetwork.EnumNetworkDrives()
Set oPrinters = wshNetwork.EnumPrinterConnections()
For ii = 0 To oDrives.Count - 1 Step 2
strTEMP = oDrives.Item(ii)
If Right(strTEMP, 1) = ":" Then
'Debug.Print "Drive " & oDrives.Item(ii) & " = " & oDrives.Item(ii + 1)
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top