[fpc-pascal]MySQL under Windows

Mirek Novak mirek.novak at auto.cz
Thu Jul 25 10:03:05 CEST 2002


Hi,
   at first I've to say, I've left FPC last year and switched to PHP :-). I'm monitoring this list to see changes an for 
(possible) future return. As for MySQL units for FPC this is is long-lasting problem and solution may be found in archive of this 
list. I've (2 years ago) got the same problem as U. It was caused by 2 things
   1. library was written for client 3.21.* (this may changed)
   2. library was written for linux only even it has some IFDEFs for windows, there was one fundamental "error" on windows there
      must be used stdcall instead of cdecl ... (so this may also be fixed)

I've all of this reported to mysql.pp mainteiner but, AFAIK, nothing has changed. I don't know what is current state and what is 
changed, bu what u've described is too similar to my problems. As I wrote, solution may be found in archive, some users have 
translated recent C headers and may send translated files to you, so search ...
Another possible solution is to use older client lib (libmysql.dll). It AFAIK doesnt matter which version of client u're using to 
connect to server. It has to be backward compatible  at level 3.* at least. So find out compatible lib to you translated mysql.pp 
file my tip is st. like 3.22.*

Fernando Lozano wrote:
> Hi there,
> 
> I am using FPC 1.0.6 under Windows 98 and MySQL 3.23.49.
> 
> The simple test program bellow generates a run-time error 103 on the first write/writeln call unless I define the variable filler. Looks like binary incompatibilities between the pre-compiled Units and the MySQL DLL. Maybe you should distribute the libmysql.dll used when compiling FPC alongside the binaries. :-)
> 
> But when I tried to build a test program using FCL, I get an Internal Error when I try to open the Dataset. This other test program is also included so you can check what I've done wrong or help me find a workaround like the filler variable on the first test.
> 
> Please let me also ask what's the proper way to check for error (can't connect, wrong password, SQL syntax, no rights, ...) when using the FCL database classes.
> 
> []s, Fernando Lozano

[...]

HTH,
-- 
--
Mirek Novak
Anima Publishers
CMS development

http://www.auto.cz
http://www.formule1.cz

jabber:mirek at njs.netlab.cz
ISEEKYOU:1<one>9<four>9<nine>44<eight>
GEsEm:+420603807838





More information about the fpc-pascal mailing list