Hello everyone.
i work with dotconnect for mySQL a few months now. and i just see when i create the datacontext it create a file app.config in my project and it store the connection info. How it is possible to disable that and store the connection info inside my code? Because like that everyone can see and access mysql Server info. it is possible devart to do that automatic or i need to edit the code alone ?.
Thanks in advance!
app.config.
The simplest solution is to remove the connection string from the app.config file and to create the DataContext instance using the parameterized constructor that takes a connection string like in the following example:
Code: Select all
DataContext1 context = new DataContext1("host=MyHost;user id=root;password=***;database=test");
-
- Posts: 7
- Joined: Wed 21 Jul 2010 17:34