I want to create a Windows service which will copy data from one database to another database. The source database is in a remote location, below is the function using SqlConnectionStringBuilder
and creating the connection string:
public string CreateConnectionString()
{
SqlConnectionStringBuilder b = new SqlConnectionStringBuilder();
b.DataSource = "ABCKOL-BCKOFF\SQLEXPRESS";
b.InitialCatalog = "netXs";
b.IntegratedSecurity = false;
b.UserID = "userid";
b.Password = "password";
return string connectionString = b.ConnectionString;
}
But unfortunately, it is showing an error like this:
Is there anything I should know more/check more?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…