Recent

Author Topic: MySQL component info  (Read 4086 times)

Middlecope

  • Jr. Member
  • **
  • Posts: 92
MySQL component info
« on: March 08, 2012, 01:48:17 am »
MariaDB 5.2.9
Lazarus 2.9.31
FPC 2.4.4

I repeated  The programs in the ~/fpc/packages/mysql and they work! At least I can connect and do SELECT Q's
It worked with libmysqlclient.so.16 and with libmariadbclient.so (easy to change)
I tried MySQL51Connection to connect.  and it tells me that version 5.1 does not work with client 5.5.
Unfortunately The 51Con is hidden in the SQLDB..lpk.
Ca anybody give me a hint where I can find the source where the MySQL51con.lpk is hidden???
Than I can try to change it a little bit and let it work.
Thanks Teunis

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MySQL component info
« Reply #1 on: March 09, 2012, 02:13:15 am »
Partly SOLVED
In my try-out project directory I copied
~/fpc/packages/mysql/src/mysql51.pp
~/fpc/packages/fcl-db/src/sqld/mysql51conn.pp
(of course with the appropriate *.inc)
I compiled all files. One change made in mysqlconn.inc
VB := StrToBCD(Src);
          {changed could not find FSQLFormatSettings }
          {VB := StrToBCD(Src, FSQLFormatSettings);}  Suggestions welcome
Unfortunately I can't use the properties in the MySQL51Connection1. I have to do it at runtime.
Queries Transactions DataSource and DBGrid worked as expected.
My conclusion is MySQL51Connection can connect to MaraiDB 5.2
Until now libmysqlclient.so.16 can be used or the libmariadbclient.so.? can be used
Any hints for updating the MySQL51Conn component in SQLDBlaz.lpk  (or instruction how to compile it)?
If I find something myself I will put it in this thread
Thanks Teunis
     

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MySQL component info
« Reply #2 on: March 13, 2012, 10:52:08 pm »
For a (partial) solution see my post:
"How to get rid of the VersionMismatch warning"

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: MySQL component info
« Reply #3 on: March 14, 2012, 09:44:11 am »
Thanks Teunis for documenting your findings... even though you seem to be talking to yourself in this thread, you will at least have helped other people that search through the forum posts...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018