Creating Firebird database programatically (C#/.NET)
Well, after Creating Firebird database programatically (Delphi) post I’m bringing the example “How to create FB database programatically from .NET?”.
The solution is easy too.
You can just use (and also extend) this simple function. It uses the Firebird ADO.NET Data Provider.
static void CreateFBDatabase(string host, string fileName, string user, string password,< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
int pageSize, bool forcedWrites, bool overwrite)
{
FbConnectionStringBuilder csb = new FbConnectionStringBuilder();
csb.Database = fileName;
csb.DataSource = host;
csb.UserID = user;
csb.Password = password;
FbConnection.CreateDatabase(csb.ConnectionString, pageSize, forcedWrites, overwrite);
}



There's 1 Comment So Far
Who Linked To This Post?
Share your thoughts, leave a comment!