tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Creating Firebird database programatically (C#/.NET)

20 Apr 2006 .NET, Firebird

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, 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);