Recent

Author Topic: Mercury Database Objects port  (Read 35579 times)

korba812

  • Sr. Member
  • ****
  • Posts: 464
Mercury Database Objects port
« on: November 14, 2009, 12:44:25 am »
Hi!
I'm working on free pascal port of Mercury Database Object (Firebird SQL/Interbase database  components).
First release (available here: http://terefere.org/mdo20091113.zip) work on windows only for now.
There are two packages: runtime (depends on FCL, no LCL required) and designtime (for lazarus).
Now i'm working on linux port (priority).
What not working yet: MDOSQLMonitor, master-detail
Please test and report

Michal

laguna

  • Sr. Member
  • ****
  • Posts: 325
Re: Mercury Database Objects port
« Reply #1 on: November 14, 2009, 06:56:57 pm »
This project is very important for Lazarus.
Would be great support for Linux.
I offer my collaboration for migration to Linux.
Congratulations for the work well done.

korba812

  • Sr. Member
  • ****
  • Posts: 464
Re: Mercury Database Objects port
« Reply #2 on: November 17, 2009, 01:14:39 pm »
thanks for Your interest! any help would be welcomed. because it run on linux now, most important thing is testing an chatching bugs.
Current version (http://terefere.org/mdo20091117.zip) have fixed some bugs (NUMERIC and DECIMAL fields with precision >= 4 now works fine, some bugs in database editor, master-detail seems to work).

inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #3 on: November 23, 2009, 02:40:09 pm »
Thanks for your work.

I have tried to test your components in Windows and Linux. I use Lazarus 0.9.28 and Firebird 1.5. Are MDO compatible with Firebird 1.5? Have I to migrate to 2.0?
I found theese troubles:

Windows:
TMDODatabase, with LoginPrompt true: exception "Operation cancelled at user's request" at opening database
Closing application with TMDODatabase open: "exception class 'External: SIGSEGV'." I know I have to close Database connection, but... error message is not clear.

Linux:
When trying to drop an TMDODatabase in a form: "Error creating component: TMDODatabase. Firebird Client library not found in the path. Please install Firebird to use this functionality." Firebird 1.5 is installed and working.

I'm very interested in your components, they are just what I need, so I will test them deeply as soon as I can.
Sorry if my English is not good. Spanish is my mother tongue.

Regards
Alexis Ramos

korba812

  • Sr. Member
  • ****
  • Posts: 464
Re: Mercury Database Objects port
« Reply #4 on: November 23, 2009, 06:11:37 pm »
Hellow, Alexis.

Quote
Are MDO compatible with Firebird 1.5? Have I to migrate to 2.0?
MDO should work with any version of Firebird. I use Firebird 2.1 on linux and 2.0 on windows without any problems.

Quote
TMDODatabase, with LoginPrompt true: exception "Operation cancelled at user's request" at opening database
if you use mdo with LCL application you should add "MDODbLogDlg" to "uses" section of your app. Console app should handle OnLogin event.

IMHO LoginDialog should be a part of lcl.

Quote
Linux:
When trying to drop an TMDODatabase in a form: "Error creating component: TMDODatabase. Firebird Client library not found in the path. Please install Firebird to use this functionality." Firebird 1.5 is installed and working.
check yor library name (in /usr/lib). MDO looking for "libfbclient.so", "libfbembed.so" and "libgds32.so". Libraries in most of linux distros have suffix with version number (eg: libfbclient.so.2.1.0). create a symlink wyth name suported by MDO.

Quote
Closing application with TMDODatabase open: "exception class 'External: SIGSEGV'." I know I have to close Database connection, but... error message is not clear.
I use Lazarus 0.9.29 (svn) and fpc 2.5.1 (svn) and it works fine for me. but in free time I will test MDO on other (older) versions of fpc and lazarus.




Dibo

  • Hero Member
  • *****
  • Posts: 1055
Re: Mercury Database Objects port
« Reply #5 on: November 23, 2009, 08:28:35 pm »
I've never used the Mercury DataBase. What are the main differences between the MDO and ZEOS?

Zaher

  • Hero Member
  • *****
  • Posts: 683
    • parmaja.org
Re: Mercury Database Objects port
« Reply #6 on: November 24, 2009, 12:50:27 pm »
Zeos support more than datbase engine.
MDO only Firebird, so if you use only FirebirdSQL use MDO instead of Zeos to get good performance.

inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #7 on: November 24, 2009, 05:05:42 pm »
Quote
Are MDO compatible with Firebird 1.5? Have I to migrate to 2.0?
MDO should work with any version of Firebird. I use Firebird 2.1 on linux and 2.0 on windows without any problems.
Working with 1.5 in Windows. Still having troubles in Linux. See below

Quote
TMDODatabase, with LoginPrompt true: exception "Operation cancelled at user's request" at opening database
if you use mdo with LCL application you should add "MDODbLogDlg" to "uses" section of your app. Console app should handle OnLogin event.
Tested. Working ok

Quote
Linux:
When trying to drop an TMDODatabase in a form: "Error creating component: TMDODatabase. Firebird Client library not found in the path. Please install Firebird to use this functionality." Firebird 1.5 is installed and working.
check yor library name (in /usr/lib). MDO looking for "libfbclient.so", "libfbembed.so" and "libgds32.so". Libraries in most of linux distros have suffix with version number (eg: libfbclient.so.2.1.0). create a symlink wyth name suported by MDO.
I have libfbclient.so in /usr/lib, but trouble persists.

Can I contact you by e-mail to send testing results? Or must I publish them here?

Thanks

korba812

  • Sr. Member
  • ****
  • Posts: 464
Re: Mercury Database Objects port
« Reply #8 on: November 24, 2009, 05:46:04 pm »
Are You using the last release? (http://terefere.org/mdo20091117.zip)
previous release have bug in library name (libfcblient.so).

inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #9 on: November 24, 2009, 08:24:37 pm »
Are You using the last release? (http://terefere.org/mdo20091117.zip)
previous release have bug in library name (libfcblient.so).


Yes, I have that release. I have just downloaded again and reinstalled components, but same error persists.
Perhaps this can be useful for you:

Stack trace:
  $0873047E  MDOERROR,  line 357 of ./runtime/MDO.pas
  $08751FAC  CHECKFBLOADED,  line 395 of ./runtime/MDOIntf.pas
  $0873CC6E  TMDODATABASE__CREATE,  line 467 of ./runtime/MDODatabase.pas
  $084AE5F4  TCUSTOMFORMEDITOR__CREATECOMPONENT,  line 1560 of customformeditor.pp

I have even tried creating a symbolic link with name libfcblient.so . Same result.

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Mercury Database Objects port
« Reply #10 on: November 24, 2009, 08:46:35 pm »
What version of libfbclient do you have?

libfbclient from Firebird 2.1.1 32-bit Superserver for Linux (non-NPTL), due to bug in gcc 3.2.x, don't load in console app under linux.




inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #11 on: November 25, 2009, 09:34:21 am »
What version of libfbclient do you have?

libfbclient from Firebird 2.1.1 32-bit Superserver for Linux (non-NPTL), due to bug in gcc 3.2.x, don't load in console app under linux.


I use Firebird 1.5.6

inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #12 on: November 26, 2009, 01:48:34 pm »
I have updated to Lazarus 0.9.29, and now I can drop mdo components (tried with firebird 1.5 and 2.1). But when trying to run the application (empty, only one TMDODatabase in a Form) this is the result:

Project project1 raised exception class 'RunError(211)'

This happens in Linux. in Windows works ok

Thanks
« Last Edit: November 26, 2009, 01:57:15 pm by inforplasta »

korba812

  • Sr. Member
  • ****
  • Posts: 464
Re: Mercury Database Objects port
« Reply #13 on: November 26, 2009, 06:42:21 pm »
in "project compiler options -> other -> custom options" add "-dUseCThreads"

inforplasta

  • New Member
  • *
  • Posts: 17
Re: Mercury Database Objects port
« Reply #14 on: November 27, 2009, 12:18:52 am »
in "project compiler options -> other -> custom options" add "-dUseCThreads"


Great!

Thank you once again. Now that I can connect with firebird databases from Windows and Linux, I'll begin deep testing. I'll inform you about any trouble.
If you want me to test any specific area, count on me.
One more question (not affects to me, but perhaps to others) Will MDO work in MacOS?

 

TinyPortal © 2005-2018