1.11M Members

How To Set Path In Visual Basic 6

 
0
 

greetings!

When i First start my VB6 program with data report it works fine. The report displayed directly. but when i try to open other programs in other directory and then when i re-run my program in data report operation a msgbox appear "Please Enter MS Jet OLE DB Initialization Information"

Data Source
Username
Password
Provider String
Open mode.

It only occurs when i try to open other file in different directory. Everytime i open other file in other directory this message appear. Anybody can help me to fix this problem and how to set my original path so when i change directory and i return to my program maybe it will works fine again.

Thankyou in advance

 
0
 

Put this in Data Environment Initialization

Connection1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sample.mdb" & ";Persist security Info=False"

hope that would help...

 
0
 

hi there, i have got this coding but its not executing...
Set db = OpenDatabase(App.Path & "\student"
my m.Access file is called student, but am getting a msg saying that it couldnt find the file student and gives the address where the file is..please help, i think there should be someting wrong in da coding...

 
0
 

Don't forget the files extension... App.Path & "\student.mdb"


Also: To set the path, use ChDir (see help)


Good Luck

 
0
 

My vb6 application opens the access data base with the vb6 database name property of the Data1 control. How can I change this to open with explicit coding in the vb coding so I can change the path in a single location?

 
1
 

Please do not hijack others threads.

Please start your own thread for a new question.

 
0
 

@zp18, start a NEW and your OWN thread by clicking THIS link. You will not get any help from members by hijacking others threads.

 
0
 

'Better late than never

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & StrDir & "SampleDB.mdb"
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article