Specify DB Location for Auto-generated Dataset

  • Thread starter Thread starter DBM
  • Start date Start date
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
 
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,

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
 
Back
Top