ConnectionProperties problem

kavalerkavaler Posts: 2
edited December 6, 2012 5:26AM in SQL Compare Previous Versions
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?
Sign In or Register to comment.