using FirebirdSql.Data.FirebirdClient; using System; class Program { static void Main(string[] args) { string connectionString = "User=SYSDBA;" + "Password=masterkey;" + "Database=mydatabase.fdb;" + "DataSource=localhost;" + "Port=3050;" + "Dialect=3;" + "Charset=NONE;" + "Role=;" + "Connection lifetime=15;" + "Pooling=true;" + "MinPoolSize=0;" + "MaxPoolSize=50;" + "Packet Size=8192;" + "ServerType=0"; using (FbConnection connection = new FbConnection(connectionString)) { connection.Open(); using (FbCommand command = new FbCommand("SELECT * FROM mytable", connection)) { using (FbDataReader reader = command.ExecuteReader()) { while (reader.Read()) { Console.WriteLine(reader.GetString(0)); } } } } } }
using FirebirdSql.Data.FirebirdClient; using System; class Program { static void Main(string[] args) { string connectionString = "User=SYSDBA;" + "Password=masterkey;" + "Database=mydatabase.fdb;" + "DataSource=localhost;" + "Port=3050;" + "Dialect=3;" + "Charset=NONE;" + "Role=;" + "Connection lifetime=15;" + "Pooling=true;" + "MinPoolSize=0;" + "MaxPoolSize=50;" + "Packet Size=8192;" + "ServerType=0"; using (FbConnection connection = new FbConnection(connectionString)) { connection.Open(); using (FbCommand command = new FbCommand()) { command.Connection = connection; command.CommandText = "INSERT INTO mytable (name, age) VALUES (@name, @age)"; command.Parameters.Add("@name", FbDbType.VarChar).Value = "John"; command.Parameters.Add("@age", FbDbType.Integer).Value = 30; command.ExecuteNonQuery(); } } } }In the above example, we are creating a connection to a Firebird database and then using FbCommand to execute an INSERT query on a table named "mytable". We are using parameters to pass the data to be inserted into the table. The package library for FirebirdSql.Data.FirebirdClient is FirebirdSql.Data.FirebirdClient. This library can be installed using NuGet package manager.