|
-
Dec 1st, 2001, 08:58 AM
#1
Thread Starter
Lively Member
Simple Simple Data Environment Question
This is my first time using the Data Environment
All I would like to do is instead of right clicking connection1 and going down to properties, and establishing a connection through there to my database.
I would like to write the code out so that I will be able to use app.path command
My purpose fo doing this is so that no matter where my project is it will never have problems finding the database.
Thanks
PinkPanther2070
-
Dec 1st, 2001, 10:42 AM
#2
Thread Starter
Lively Member
Does anyone know how to make a connection in the data environment via code
-
Dec 1st, 2001, 11:15 AM
#3
Thread Starter
Lively Member
Does anyone even know if this is possible?
-
Dec 1st, 2001, 11:22 AM
#4
Hyperactive Member
It surely is possible,
Run thru the properties of your data connection.
You must find something like 'Connectionstring' or something like that.
in this connectionstring, you will not only find the db path, but also the provider (Jet,ODBC,...).
best way of finding this string thru code is:
msgbox YourConnectionName.Connectionstring
Then replace the path to your db in this string with app.path & "\YourDb"
Hope it's clear enaugh
Luc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|