guys i’m still new on developing system and I’ve encountered this
This is the string i use to connect. It is inside of a class.
public string connections1 = "user id=sa;" +
"password=;server=SEAN\\SQLEXPRESS;" +
"Trusted_Connection= false;" +
"database= METROEXPRESS; ";
How do i change this to put the connection information in an .ini file?
You’d not using an .ini file; you’d use a .config file, which is an XML file containing your configuration. If you’re doing a rich client app (console, winforms, wpf) add an Application Configuration to your project and go from there (look up the section). If you’re doing an asp.net application, you should already have a web.config, which you can also add a section to.
Here’s an example: http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/9a8c9f5a-092e-4c4a-87bb-9f35d8f55da1/