private void conectar()
{
try
{
string connectionString =
"User=SYSDBA;" +
"Password=masterkey;" +
"Database=EXAMPLE.fdb;" +
"DataSource=localhost;" +
"Port=3050;" +
"Dialect=3;" +
"Charset=NONE;" +
"Role=;" +
"Connection lifetime=15;" +
"Pooling=true;" +
"Packet Size=8192;" +
"ServerType=0";
conector = new FbConnection(connectionString);
FbTransaction myTransaction = conector.BeginTransaction();
FbCommand myCommand = new FbCommand();
myCommand.CommandText = "INSERT INTO LANGUAGES(LANGUAGENO, NAME, MODIFYTIMESTAMP, MODIFYUSER, MODIFYPOSITION) VALUES(3, 'Francés', NULL, NULL, NULL);";
myCommand.Connection = conector;
myCommand.Transaction = myTransaction;
// Commit changes
myTransaction.Commit();
// Free command resources in Firebird Server
myCommand.Dispose();
// Close connection
conector.Close();
}
catch (Exception)
{
Console.WriteLine("No conecta");
}
}