ConnectionProperties problem
kavaler
Posts: 2
Hi!
I have a little problem with connection to Database.
Code:
using (Database dbSource = new Database(), dbTarget = new Database())
{
// create connection to DB
Console.WriteLine("Registering databases...");
dbSource.Register(new ConnectionProperties("TRON\\KAVALER", "db3", "sa", "1"), Options.Default);
dbTarget.Register(new ConnectionProperties("kavasql", "db4", "sa", "2"), Options.Default);
Console.WriteLine("Comparing Databases...");
//code...
}
===============================================
dbTarget.Register(new ConnectionProperties("kavasql", "db4", "sa", "2"), Options.Default); - connection is set
dbSource.Register(new ConnectionProperties("TRON\\KAVALER", "db3", "sa", "1"), Options.Default); - connection is failed
Problem with serverName - "TRON\\KAVALER" .
Error: "ExecuteReader: CommandText property has not been initialized"
How i should type serverName correct?
I have a little problem with connection to Database.
Code:
using (Database dbSource = new Database(), dbTarget = new Database())
{
// create connection to DB
Console.WriteLine("Registering databases...");
dbSource.Register(new ConnectionProperties("TRON\\KAVALER", "db3", "sa", "1"), Options.Default);
dbTarget.Register(new ConnectionProperties("kavasql", "db4", "sa", "2"), Options.Default);
Console.WriteLine("Comparing Databases...");
//code...
}
===============================================
dbTarget.Register(new ConnectionProperties("kavasql", "db4", "sa", "2"), Options.Default); - connection is set
dbSource.Register(new ConnectionProperties("TRON\\KAVALER", "db3", "sa", "1"), Options.Default); - connection is failed
Problem with serverName - "TRON\\KAVALER" .
Error: "ExecuteReader: CommandText property has not been initialized"
How i should type serverName correct?