If you like this, buy me some beer!

UnSQL For FireBird

Welcome to UnSQL For FireBird !

How to setup:

  1. Open Your project first.
  2. Add UnSQL.dll (Choose what type of database) to your reference.
  3. Add "using UnSQL.FireBird" to your C# files or "Import UnSQL.FireBird" in VB.NET
  4. 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:
  • Install FireBird
        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.

  • Start FireBird
        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!");
        }

  • Stop FireBird
        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");
        }

  • Uninstall FireBird
        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'

Last edited Jun 16, 2012 at 2:07 PM by K9998, version 2

Comments

No comments yet.