how to change sql database dynamicly

  • Thread starter Thread starter Hasan O. Zavalsiz
  • Start date Start date
H

Hasan O. Zavalsiz

Hi ,
in my application connection string is in the INI file. How I can database
via program and write it to INI

thanks in advance
 
Hi,

Just change the connection string programatically and when ever you change
the connection string do connect to the database again while closing the
previuos connection.. if this is SQL server use the microsoft data access
application block for accessing your data base, there you don't have to
worry about connection pool management etc.

Nirosh.
 
Hi,
Step1
Use method SQLConnection.ChangingDatabase("AnotherName") .This method
changing current database for a open connection.
Step 2
Get SqlConnection.ConnectionString and write(replace)it to .INI file.

Bohdan G³owacki
 
Back
Top