tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Creating Firebird database programatically (Delphi)

18 Apr 2006 1 mins Delphi/Object Pascal/Pascal, Firebird

Today my colleague asked me the question, “How to create FB database programatically from Delphi?". Well, the solution is very easy, just use the following code (it’s using the InterBase Express components):

IBDatabase1.DatabaseName := ChangeFileExt(Application.ExeName, '.fdb');
IBDatabase1.Params.Add('USER ''SYSDBA''');
IBDatabase1.Params.Add('PASSWORD ''masterkey''');
IBDatabase1.Params.Add('PAGE_SIZE 4096');
IBDatabase1.Params.Add('DEFAULT CHARACTER SET WIN1250');
IBDatabase1.CreateDatabase;

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at www.tabsoverspaces.com.