[Lazarus] Lazarus and MySQL 5.7

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
What version of Lazarus can connect to MySQL 5.7 using TSqlConnector?
My laptop has 1.6 and does not seem to be able to connect using that
component.

Thx, Terry

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
On 2016-11-19 03:25, Terry A. Haimann via Lazarus wrote:
> What version of Lazarus can connect to MySQL 5.7 using TSqlConnector?

Technically it's got nothing to do with the Lazarus version, but rather
the FPC version. FPC is the one where the database components are
defined, in the FCL.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list

Il 19/11/2016 11:40, Graeme Geldenhuys via Lazarus ha scritto:

On 2016-11-19 03:25, Terry A. Haimann via Lazarus wrote:
> What version of Lazarus can connect to MySQL 5.7 using TSqlConnector?
Technically it's got nothing to do with the Lazarus version, but rather
the FPC version. FPC is the one where the database components are
defined, in the FCL.

Lazarus 1.6 includes the package SQLDBLaz which provides support for MySQL from versions 4.0 to 5.6.
Looking into the sources, version 5.7 is already there, but the package doesn't support it, and therefore it can't be used taking advantage of the Object Inspector.
It should work by adding mysql57conn to the uses clause, and creating the required objects and filling up the appropriate fields programmatically.

Sort of
SQLConnector1.ConnectorType := 'MYSQL 5.7'; // programmatically because the OI doesn't have it
MySQL57Connection1 := TMySQL57Connection.Create(Self); // programmatically because you can't drop it into the form
etc..

Giuliano


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
On 2016-11-21 00:30, Giuliano Colla via Lazarus wrote:
> Lazarus 1.6 includes the package SQLDBLaz which provides support for MySQL from
> versions 4.0 to 5.6.

Yes, and that "Lazarus Packages" is simply a IDE wrapper around the
components included by FPC's fcl-db code. You don't need Lazarus to use
any components or classes introduced by FPC.


> Looking into the sources, version 5.7 is already there, but the package doesn't
> support it

It is pretty straight forward to create a new "registered component"
line in the Lazarus packages [SqlDBLaz], which in turn will register a
icon/component in Lazarus's component palette.

Too many developers don't seem to understand the underlying workings of
components or classes. If they don't see it in the component palette
they don't know how to use it. It is just sad how "RAD development" has
dumbed down so many developers.


> SQLConnector1.ConnectorType := 'MYSQL 5.7'; // programmatically because the OI doesn't have it
> MySQL57Connection1 := TMySQL57Connection.Create(Self); // programmatically because you can't drop it into the form

Glad to see you figured it out (RAD didn't get the better of you). Now
lets hope others can learn from that. :)


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list

Il 21/11/2016 10:33, Graeme Geldenhuys via Lazarus ha scritto:

It is pretty straight forward to create a new "registered component"
line in the Lazarus packages [SqlDBLaz], which in turn will register a
icon/component in Lazarus's component palette.
Actually it took me almost a full quarter of an hour to do it. The most of the time was spent to draw the proper Icon, not too much different from the others, and to detect a typo.
I'm lazy and I like RAD tools, because finding all the published properties neatly listed in the OI saves me time and mistakes.
I cannot contribute the patch right now because I didn't make it on an SVN version, but whoever is interested can get a patched version of SqlDBLaz for Lazarus 1.6 supporting MySql 5.7 from this link:

/www.bononiadocta.it/Lazarus/Sqldb.tar.bz2

Just use it to replace the sqldb folder in the $PATH$TO$LAZARUS/components folder and rebuild the IDE.

Giuliano


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list

Sorry, the link below is broken.

This is the good one:

http://www.bononiadocta.it/Lazarus/Sqldb.tar.bz2


Il 22/11/2016 01:37, Giuliano Colla ha scritto:
I cannot contribute the patch right now because I didn't make it on an SVN version, but whoever is interested can get a patched version of SqlDBLaz for Lazarus 1.6 supporting MySql 5.7 from this link:

/www.bononiadocta.it/Lazarus/Sqldb.tar.bz2

Just use it to replace the sqldb folder in the $PATH$TO$LAZARUS/components folder and rebuild the IDE.


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
Hi,
Please create bug report on http://bugs.freepascal.org and attach your modified files (at least ;-))
-Laco.

Sorry, the link below is broken.

This is the good one:

http://www.bononiadocta.it/Lazarus/Sqldb.tar.bz2


Il 22/11/2016 01:37, Giuliano Colla ha scritto:
I cannot contribute the patch right now because I didn't make it on an SVN version, but whoever is interested can get a patched version of SqlDBLaz for Lazarus 1.6 supporting MySql 5.7 from this link:

/www.bononiadocta.it/Lazarus/Sqldb.tar.bz2

Just use it to replace the sqldb folder in the $PATH$TO$LAZARUS/components folder and rebuild the IDE.




--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, November 21, 2016 2:33 am, Graeme Geldenhuys via Lazarus wrote:

> On 2016-11-21 00:30, Giuliano Colla via Lazarus wrote:
>
>> Lazarus 1.6 includes the package SQLDBLaz which provides support for
>> MySQL from
>> versions 4.0 to 5.6.
>
> Yes, and that "Lazarus Packages" is simply a IDE wrapper around the
> components included by FPC's fcl-db code. You don't need Lazarus to use any
> components or classes introduced by FPC.
>
>
>> Looking into the sources, version 5.7 is already there, but the package
>> doesn't support it
>
> It is pretty straight forward to create a new "registered component"
> line in the Lazarus packages [SqlDBLaz], which in turn will register a
> icon/component in Lazarus's component palette.
>
> Too many developers don't seem to understand the underlying workings of
> components or classes. If they don't see it in the component palette they
> don't know how to use it. It is just sad how "RAD development" has dumbed
> down so many developers.
>

But this is one issue with components is once you create your own rolled
component, it becomes a non standard component available in only your IDE
and no one elses...

Every time I think about inheriting a component and creating my own, I
stop myself and try to just use the built in component palette ones
wherever possible.... As sort of a "I know the standard components will
always be there" but my own rolled components may not.. if I do a fresh
install of an IDE on another system, etc. Then it requires using non
standard components.

But as for mysql, obviously once someone ports the component it will
become standard and be shipped with the ide. I'm speaking of other cases.
Like say inheriting a button and creating my own... then I'm using a non
standard component and it makes me scared.

Just what I've found anyway, that the biggest scariest thing about
creating your own components, is they are now non standard not shipped
with the IDE.

I first realized this when I needed a button that had new behavior in
Delphi.. so I created my own. Then I realized that any time I install the
IDE on a system, I now have the headache of having to install a non
standard component in order to use it.

As powerful as creating your own components is, it also comes with some
drawbacks.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
On 2016-11-22 13:53, Lars via Lazarus wrote:
> I first realized this when I needed a button that had new behavior in
> Delphi.. so I created my own. Then I realized that any time I install the
> IDE on a system, I now have the headache of having to install a non
> standard component in order to use it.

That comes down to the fact that the Delphi, Lazarus and MSEide built-in
form designers can't handle component that aren't registered with the
IDE.  You have no such problem with fpGUI's Visual Forms Designer.

[kind of off-topic to what I suggested in my previous post]

Either way, I don't think it is that bad using custom components you
wrote, based on standard components. Such components source code will
normally be included with your own applications so no problems compiling
the app.

Using 100's of 3rd party components (so often seen in Delphi projects)
is a timebomb though. Even worse, if you didn't have the full source
code of those 3rd party components. We got bitten badly by that in the
D7 and Kylix 3 days.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 18 Nov 2016 21:25:14 -0600
"Terry A. Haimann via Lazarus" <[hidden email]> wrote:

> What version of Lazarus can connect to MySQL 5.7 using TSqlConnector?
> My laptop has 1.6 and does not seem to be able to connect using that
> component.

I added TMySQL57Connection to trunk (1.7).

Mattias
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus and MySQL 5.7

Free Pascal - Lazarus mailing list

>> What version of Lazarus can connect to MySQL 5.7 using TSqlConnector?
>> My laptop has 1.6 and does not seem to be able to connect using that
>> component.
> I added TMySQL57Connection to trunk (1.7).

Thank you Mattias.
-Laco.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus