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?