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

Dynamic Database (MDB) file

Status
Not open for further replies.

Genotix

Programmer
Dec 16, 2004
53
NL
Hi all,

At the moment I made myself a little config file where I've declared the path to the database file I'm using.
My application reads out this information an put's in in an variable.

I can use this variable with any recordset i'd like now.
I've got only one problem.
How do i get this variable in my DataEnvironment connection object?
Is it possible to execute that's inserted in a properties dialog.

E.G.

When you insert a caption text for a Label1 in the properties box it's pretty static.
When you declare new contents like : "Label1.caption = RS!Description" it's dynamically set (in the form code).

Is it possible to do this type of declaration from within the properties menu?

Linux IS userfriendly.
It's only very selective about who it's friends are.
 
You can reset your dataEnvironment connection object like so :
DataEnvironment1.CnnReport.ConnectionString = "Provider=MSDataShape.1;Persist Security Info=False;Data Source=" & strDataBaseLocation & ";Data Provider=MICROSOFT.JET.OLEDB.4.0;;Jet OLEDB:Database Password=" & strPassword

This is for an Access 2000 database for example.
The database path is in the variable strDataBaseLocation.
If it is Password protected "Database Password=" & strPassword" (otherwise you do not need this part.

As for the second part of the question (I am not sure I have well understood ...), I do not think it is possible. But maybe you could use a textBox that looks like a label to do it ?
(Textbox is locked, backcolor etc... changed to what you like).
I usualy do not use bound objects, so I might be wrong ...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top