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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Universal Naming Convention (UNC) in VB 6 Professional

Status
Not open for further replies.

newguy9

Instructor
Aug 13, 2001
6
0
0
US
Visual Basic 6 Professional does not seem to handle data files whose pathname uses universal naming convention.

I just need to create and read simple sequential access data files whose pathname is given in UNC.

Unfortunately, the usual Open statement crashes
(Open strFileName For Output As #1
where strFileName uses UNC)

Does anyone know of a way to get around this problem?
 
don't know what problems you are having but I can read and write to a file such as
Code:
sFile = "\\PROD2\DISK1\server\data\journals.dat"
using the standard 'Open' statement

ex. Open sFile For Input As #nFile
ex. Open sFile For Output As #nFile
ex. Open sFile For Binary As #nFile
 
That's great info, JustinEzequiel! I really appreciate it. The problem is I still can't get it to work for me.

I found some VB 6 documentation that said ChDrive could not handle a UNC. Even though I'm not using ChDrive, I was afraid it related to my problem.

Maybe I can check the accuracy of the UNC on the server by using App.Path

Thanks again. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top