Recent

Author Topic: Releasing beta version of Turbo Bird  (Read 31491 times)

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Releasing beta version of Turbo Bird
« on: October 16, 2010, 09:52:08 am »
TurboBird is a FireBird administration tool.

http://code.sd/turbobird/

I've used only the standard packages/components of Lazarus to produce this application.

You can download executable for Linux and source code from that page.

There are important things that I'm unable to do, like backup, restore, sweep. Anybody have an idea about how to do it?

Motaz
« Last Edit: April 18, 2011, 09:10:44 am by motaz »

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Releasing beta version of Turbo Bird
« Reply #1 on: October 17, 2010, 04:22:24 am »
Windows 32 bit version has been uploaded to the page.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Releasing beta version of Turbo Bird
« Reply #2 on: October 18, 2010, 04:56:59 am »
I'm downloading it, hope I can get rid of my other FireBird admin tool (which is based on wxWidgets, and it's too BIG).

Lam.Abdeldjalil

  • New member
  • *
  • Posts: 7
Re: Releasing beta version of Turbo Bird
« Reply #3 on: October 18, 2010, 06:32:08 pm »
Hi ,

Great job Motaz   :)

Quote
There are important things that I'm unable to do, like backup, restore, sweep. Anybody have an idea about how to do it?

Just Use the command line tool GBAK (backup/restore)
Just Use the command line tool GFIX (repair, sweeping)
Just Use the command line tool GSEC (administration issues)

ex:
backup
Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
var
  AProcess: TProcess;
begin
  AProcess := TProcess.Create(nil);
  AProcess.CommandLine := '"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe" -v -t -user SYSDBA -password masterkey "Localhost:d:/data/EMPLOYEE.FDB" "D:\DbSave.fbk" ';
  AProcess.Execute;
end;
restore (database does'nt exist)
Code: [Select]
procedure TForm1.Button2Click(Sender: TObject);
var
  AProcess: TProcess;
begin
  AProcess := TProcess.Create(nil);
  AProcess.CommandLine := '"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe"  -c -v -user  SYSDBA -password masterkey "D:\DbSave.fbk" "Localhost:d:/data/EMPLOYEE2.FDB" ';
  AProcess.Execute;
end;

more options follow the links :
http://www.destructor.de/firebird/gbak.htm
http://www.destructor.de/firebird/gfix.htm
http://www.destructor.de/firebird/gsec.htm

good luck

Regards;
Lam.Abdeldjalil

fredycc

  • Sr. Member
  • ****
  • Posts: 265
Re: Releasing beta version of Turbo Bird
« Reply #4 on: October 18, 2010, 09:01:31 pm »
Good job motaz  :)

captian jaster

  • Guest
Re: Releasing beta version of Turbo Bird
« Reply #5 on: October 19, 2010, 01:45:14 am »
It failed to initialize some Library's on Windows 7 for me D:
When I tried to make a new Database...
« Last Edit: October 19, 2010, 01:48:20 am by captain jaster »

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Releasing beta version of Turbo Bird
« Reply #6 on: October 19, 2010, 07:58:56 am »
Captain_Jasper>
Did you have Firebird server installed in Windows 7 and which version?
Can you open existing Firebird database? is the error occurs only when creating new db?

Lam.Abdeldjalil >

I think the command line tools can work only in server, but I assume that Turbo Bird user are using it to access remote servers. How can I use that command tools in this case?
I need API to do this in Lazarus, the same like InterBase Adim components in Delphi
« Last Edit: October 19, 2010, 08:00:36 am by motaz »

Zoran

  • Hero Member
  • *****
  • Posts: 1575
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Releasing beta version of Turbo Bird
« Reply #7 on: October 19, 2010, 08:43:44 am »
Beutiful! Congratulations, Motaz.

About your problem with backup, as this seemed interesting to me, I tried to dig, and in this faq some "Services API" is mentioned many times.

So, what you need is a way to use this services API. I found that this API is described in the Interbase 6.0 API guide (the pdf is availible for download from this page). In this pdf jump to Chapter 12 named "Working with services". We see there that that this API consists of four functions -- isc_service_attach, isc_service_start, isc_service_query, isc_service_detach.

Now, it seems that all these services API functions are already wrapped by Lazarus developers in ibase60dyn unit (IBConnection component uses this unit), so try adding this unit to your uses list and see if you can use these API functions.
I have not tried these functions myself yet, but it looks like that should work. That is what I managed to dig this morning. I hope this helps. Your tool is beutiful, it would be bad if you just could not add backup, restore and sweep, to make it perfect!

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Releasing beta version of Turbo Bird
« Reply #8 on: October 19, 2010, 11:14:10 am »
Thanks Zoran for this help.
Now I've downloaded Interbase 6 API Guide

I think I need a time to read and try to call these procedures.

Zoran

  • Hero Member
  • *****
  • Posts: 1575
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Releasing beta version of Turbo Bird
« Reply #9 on: October 19, 2010, 01:19:13 pm »
I think I need a time to read and try to call these procedures.

Yes, I am reading it very slowely too, as I am not very good at understanding C code. :-[
I am sure, however, that eventually we'll get the working pascal code! :)

korba812

  • Full Member
  • ***
  • Posts: 133
Re: Releasing beta version of Turbo Bird
« Reply #10 on: October 19, 2010, 10:23:03 pm »

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Releasing beta version of Turbo Bird
« Reply #11 on: October 20, 2010, 06:05:27 am »
What about the license of this unit:

Quote
ortions created by Inprise Corporation are Copyright (C) Inprise }
24     { Corporation. All Rights Reserved.

korba812

  • Full Member
  • ***
  • Posts: 133
Re: Releasing beta version of Turbo Bird
« Reply #12 on: October 20, 2010, 09:28:14 am »
Quote
{************************************************************************}
{                                                                        }
{       Borland Delphi Visual Component Library                          }
{       InterBase Express core components                                }
{                                                                        }
{       Copyright (c) 1998-2000 Inprise Corporation                      }
{                                                                        }
{    InterBase Express is based in part on the product                   }
{    Free IB Components, written by Gregory H. Deatz for                 }
{    Hoagland, Longo, Moran, Dunst & Doukas Company.                     }
{    Free IB Components is used under license.                           }
{                                                                        }
{    The contents of this file are subject to the InterBase              }
{    Public License Version 1.0
(the "License"); you may not             }
{    use this file except in compliance with the License. You            }
{    may obtain a copy of the License at http://www.Inprise.com/IPL.html }
{    Software distributed under the License is distributed on            }
{    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either              }
{    express or implied. See the License for the specific language       }
{    governing rights and limitations under the License.                 }
{    The Original Code was created by InterBase Software Corporation     }
{       and its successors.                                              }
{    Portions created by Inprise Corporation are Copyright (C) Inprise   }
{       Corporation. All Rights Reserved.                                }
{    Contributor(s): Jeff Overcash                                       }
{                    Mercury Database Objects [info@mdolib.com]          }
{                                                                        }
{************************************************************************}
InterBase Public License - this is the same license as FirebirdSQL have.
http://www.firebirdsql.org/index.php?op=doc&id=ipl

Zoran

  • Hero Member
  • *****
  • Posts: 1575
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Releasing beta version of Turbo Bird
« Reply #13 on: October 23, 2010, 03:08:52 pm »
MDO really seems to be the good solution, as it provides the nice interface to services API.

However, I played a little with these API functions. So, if you are interested in using services API, you can take a look at this simple class with basic functionality (backup, restore, sweep).

Here it is, attached to this post. It is included in the simple project which demonstrates its functionality.
« Last Edit: October 26, 2010, 11:55:29 am by Zoran »

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Releasing beta version of Turbo Bird
« Reply #14 on: October 24, 2010, 04:43:12 am »
Zoran
I've tested your sample backup/resotre/sweep appliction and it works fine.
did you wrote this unit: UnitFirebirdServices
I didn't find any header information about license, developer, etc.

 

TinyPortal © 2005-2018