Reputation:
string conString = "User=SYSDBA;Password=masterkey;Database=C:\\Users\\dev1\\Desktop\\testdb.fdb;Dialect=3;Charset=UTF8;ServerType=1;";
FbConnection fcon;
try
{
fcon = new FbConnection(conString);
string query = "create table test( name varchar(40) );";
FbCommand cmd = new FbCommand(query, fcon);
cmd.ExecuteNonQuery();
}
catch (Exception e)
{
string errstr = e.Message.ToString();
System.Console.WriteLine("Error: " + errstr);
}
I only get the error message "Connection must be valid and open"; how do I determine why the connection could not be established exacty?
Upvotes: 2
Views: 201