I have been asked to buid a VB code which is flexible.Wen i take project from
one place to another,i need not change path in all forms.If i change in one
place,then it gets reflected in all other forms.
ex:In com1,I hav path=e:\proj\a1.MDB which I use in al the forms;
& in com2,I need to change the above path such tat I need to change it only once.
Can I assign the whole path to a variable and declare the whole thing as global??
Is it possible to write
data1.ConnectionString = App.Path + "db1.mdb"
If so where do I define App.Path??
I am new to VB6.pl help
kartik07
0
Light Poster
Recommended Answers
Jump to PostHi karthik,
yes you can use app.path ti resolve your connection problem,
we can use it from where ever you need, it takes the application folder path as App.path
that is your Database should placed on the folder where you placed your application.
With addition use can use Subfolder names …
Jump to PostHi Karthik
Use module
and define it in the module,
yo cann access the module from anywhereWith regards
Venkatramasamy SN
Jump to PostHi karthik,
In the module write your code in function
the funcation can be accessed from anywhere in the project by using Mudulename.functionname
for example]
Your module name is DBCon
And Functionname is Connection
The code to access the function isDBCon.Connection
Hope this will help …
Jump to Postok,
then you must place/paste your project in the "E:\LATEST" location in which system you are using ther with, if the problem still exists, kindly send me the details of the sequence details from begining what you do , what you get and what you wantwith regards
Venkatramasamy …
All 14 Replies
venkatramasamy
1
Junior Poster in Training
kartik07
0
Light Poster
venkatramasamy
1
Junior Poster in Training
kartik07
0
Light Poster
kartik07
0
Light Poster
kartik07
0
Light Poster
venkatramasamy
1
Junior Poster in Training
kartik07
0
Light Poster
venkatramasamy
1
Junior Poster in Training
kartik07
0
Light Poster
venkatramasamy
1
Junior Poster in Training
SCBWV
71
Junior Poster
hkdani
39
Posting Pro in Training
kartik07
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.