How do you set the datasource with code in a data enviroment designer?
What other values can you set in code?
But i really need to know how to set the path so i can use the app.path property.
Printable View
How do you set the datasource with code in a data enviroment designer?
What other values can you set in code?
But i really need to know how to set the path so i can use the app.path property.
If you are using an Access database (or even if you are not) you can change the Connection object inside the data environment to change things like the datasource (a.k.a Access db path).
VB Code:
'here is an example using using Jet 4.0 'de is my dataenvironment 'common is my connection object dim cnnStr as string cnnStr = Split(de.Common.ConnectionString, ";") cnnStr(1) = "Data Source=" & app.path & "\Common.mdb" de.Common.ConnectionString = Join(cnnStr, ";") de.Common.Open
Thanks man that is what i needed.