[lazarus] Lazarus with mysql unit
Michael Van Canneyt
michael.vancanneyt at wisa.be
Thu Sep 5 11:23:00 EDT 2002
On Thu, 5 Sep 2002, Michael A. Hess wrote:
> Tony Maro wrote:
>
> > Perhaps I just get all the weird errors, but...
> >
> > Has anyone succeeded in using the mysql unit from a graphical
> > application in Lazarus? I can compile a console application that uses
> > mysql easily enough, but if I have a form displayed and use the exact
> > same code the program dumps on the mysql_connect call (but only if a
> > connect is successful... if I put in an invalid username or password it
> > doesn't die.)
>
> I haven't tired it with a GUI app. but I did have problems this weekend
> when trying to use the MySQL unit. It would constantly crash on me when
> trying to close the connection not when opening as you experienced. I
> discovered that when I use the example code but insure that the
> variables that it wants to use are global but not local to the procedure
> it would work OK. However, while it does now work I do see one output
> value that is corrupted which is a time value which doesn't effect
> things. This time value only gets corrupted when I run the procedure
> with the MySQL code.
>
> So just to assure you, yes it appears at least from my perspective that
> something is amiss in the MySQL unit.
The mysql unit as provided with FPC 1.0.6 works only with version 3.22
of MySQL.
If you want to use version 3.23, you should use the latest version of
the mysql unit in CVS. As you will see, there are 3 versions:
3.22
3.23
4.0
Using the wrong version will result in crashes as described by you.
Michael.
More information about the Lazarus
mailing list