|
| How to get datasource name dynamically from .txt / .xml file using C#.net 2.0 with Mysql 5.0 |
 |
Wed, 2 Apr 2008 09:38:09 +0000 |
I am using C#.Net 2.0 With MySql 5.0. I created a project and it works fine in
my machine. But problem occurs when i try to run the project other than my
machine. I wrote datasource=mysystem name in connection string. Is it possible
to get datasource name dynamically from a text file (*.txt) or from .xml file
for MySql.
Regards,
Tamizhselvi
|
| Post Reply
|
| Re: How to get datasource name dynamically from .txt / .xml file using C#.net 2.0 with Mysql 5.0 |
 |
Wed, 2 Apr 2008 11:38:51 +0000 |
Add an App.Config file to your project and you can drop a connection string in
there like so:
<connectionStrings>
<add name="PICK A NAME" connectionString="YOUR CONNECTION
STRING"/>
</connectionStrings>
You can then use ConfigurationManager to read it.
Hope this helps,
Wes
|
| Post Reply
|
|
|
|
|
|
|
|
|
|