Specify DB Location for Auto-generated Dataset

D

DBM

I auto-generated a dataset for CRUD DB usage. I did this to save the time in
generating this myself by hand. Bad idea or not I'd still like to use the
code, but I also want to dynamically specify the location of the database,
I'm using Access for now and the connection string is hard coded into the
database class App.config file. I've tried creating variables in the
auto-generated classes to no avail. Any help would be greatly appreciated.

TIA

Brad
 
M

Miha Markic

app.config file isn't meant to be copied to target machine. You should craft
a proper one for the target machine (or modify the original one).
That's why it is called *configuration* file.
 
B

Brad

Miha,

My problem is that this is the app.config file associated with the Data
Access layer not the app.config that's found in the root of the UI/parent.
I am also under the impression that the app.config can't be modified
dynamically at run time. Is this correct?

Thanks

Brad


Miha Markic said:
app.config file isn't meant to be copied to target machine. You should
craft a proper one for the target machine (or modify the original one).
That's why it is called *configuration* file.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

DBM said:
I auto-generated a dataset for CRUD DB usage. I did this to save the time
in generating this myself by hand. Bad idea or not I'd still like to use
the code, but I also want to dynamically specify the location of the
database, I'm using Access for now and the connection string is hard coded
into the database class App.config file. I've tried creating variables in
the auto-generated classes to no avail. Any help would be greatly
appreciated.

TIA

Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top