MySQL and Lazarus problem
Posted: 04.12.2007, 20:48
I wrote a lazarus program and is working flawlessly on a machine running ubuntu 7.04 with MySQL client 5.0. My app uses 4.0 protocol for its connections to a server running MySQL server 4.0.24. I tried to deploy the app directly on this server, but the data gets corrupted when retrieving varchar fields. Example:
On the Ubuntu-MySQL 5.0 machine the resulting value of cardType is 'OV' as it should be, while the resulting value of cardType when executed directly on the server running MySql 4.0.24 is 'O', that is one char is missing.
I've got no idea why this could be happenning but it's really strange.
Code: Select all
ZeosQuery1.Sql.Add('Select card_type from cards');
ZeosQuery1.Open;
cardType:=ZeosQuery1.FieldByName('card_type').AsString;
I've got no idea why this could be happenning but it's really strange.