If you like this, buy me some beer!
UnSQL For FireBird
Welcome to UnSQL For FireBird !
How to setup:
- Open Your project first.
- Add UnSQL.dll (Choose what type of database) to your reference.
- Add "using UnSQL.FireBird" to your C# files or "Import UnSQL.FireBird" in VB.NET
- You need to make sure that your application can get Administrator rights due to the FireBird must running as a windows service. Otherwise you will unable to use functions below.
How to use:
private void btnInstall_Click(object sender, EventArgs e)
{
var iController = new Controller();
iController.InstallComplete += iController_installcomplete;
iController.Install(Application.StartupPath + "\\db\\",
Controller.InstallType.Super);
}
private void iController_installcomplete()
{
MessageBox.Show("INSTALL Database Completed!");
}
///////////////////////////////////////////////////////////////////////////////////
//Param definition
#region InstallType enum
public enum InstallType
{
Classic,
Super,
SuperClassic
}
#endregion
///////////////////////////////////////////////////////////////////////////////////
//Notice: According to Firebird's document, "Super" type will be fit for most of situations in windows.
private void btnStart_Click(object sender, EventArgs e)
{
var iController = new Controller();
iController.StartComplete += iController _RunComplete;
//You need to use the path where you installed the Database
iController.StartService(Application.StartupPath + "\\db\\");
}
private void iController_RunComplete()
{
MessageBox.Show("Database Started!");
}
private void btnStop_Click(object sender, EventArgs e)
{
var iController = new Controller();
iController.StopComplete += iController_StopComplete;
//You need to use the path where you installed the Database
iController.StopService(Application.StartupPath + "\\db\\");
}
private void iController_StopComplete()
{
MessageBox.Show("Database Stopped");
}
private void btnUninstall_Click(object sender, EventArgs e)
{
var iController = new Controller();
iController.UninstallComplete += iController_UninstallComplete;
//You need to use the path where you installed the Database
iController.Uninstall(Application.StartupPath + "\\db\\");
}
private void iController_UninstallComplete()
{
MessageBox.Show("Database Uninstall Complete!");
}
Notice: The default USER is 'SYSDBA' and PASSWORD is 'masterkey'