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

ASP app path in dll file

Status
Not open for further replies.

roadrnr

Programmer
Dec 4, 2002
3
US
I have a problem I haven't been able to locate an answer for. I have a directory "A" that my VB6 dll file is located at, in that directory, are two subdirectories "B1" and "B2". Each subdirectory houses a separate instance of the web application.

Each of the subdirectories contains a file named connection.txt which should tell the dll file which database to connect to. I have the following code in the Initialize Class of my dll.
Open App.Path & "\connection.txt" For Input As #1
Line Input #1, DSN
Close #1

The App.Path is the problem. It is currently listed as the "A" directory.

How can I set the Path statement to the path of the file that calls the dll?
 
I think you might find the ChDir change directory a good option to use instead of app.path.
Private Const B1 As string = "C:\ASPApp\A\B1"
Private Const B2 As String = "C:\ASPApp\A\B2"

Open ChDir(B1) & "\connection.txt" For Input As #1
Line Input #1, DSN
Close #1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top