2016-12-16 4 views

답변

0
using (SqlConnection Conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["YourConfigFileAssignName"].ConnectionString)) 
{ 

}; 

YourConfigFileAssignNameapp.config 파일의 신 연결 문자열의 할당 된 이름입니다.

<connectionStrings> 
    <add name="YourConfigFileAssignName" 
     connectionString="Data Source=YourDataSource;Initial Catalog=YourDBname;User ID=SQLid;Password=SQLpass" 
     providerName="System.Data.SqlClient"/> 
</connectionStrings> 
+0

Tnk u so much sir –