ZDbcMySQLStatement and Unicode parameters

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
bravecobra
Junior Boarder
Junior Boarder
Posts: 29
Joined: 31.10.2005, 00:09
Location: Antwerp
Contact:

ZDbcMySQLStatement and Unicode parameters

Post by bravecobra »

Hi,

in the current SVN repository is still an issue when using parameterized queries. When a parameter is being detected as stUnicodeString, then the PrepareSQLParam does not detect that (the case statement doesn't handle stUnicodeString).

I've attached the patch. Maybe we want to handle compiler versioning to this, since I've only tested on Delphi 2010.

On a side note, we might wanna check other database drivers as well, making sure all types are being handled.
You do not have the required permissions to view the files attached to this post.
Brave Cobra
bravecobra.com
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Brave,

his patch doesn't seem to break the test suite (but doesn't improve the results either). As adding an unsupported parameter can't hurt that much I committed this change.

SVN rev 770.

Mark
Image
bravecobra
Junior Boarder
Junior Boarder
Posts: 29
Joined: 31.10.2005, 00:09
Location: Antwerp
Contact:

Post by bravecobra »

Tnx, at least that would make my framework work under Delphi 2010 :)
Brave Cobra
bravecobra.com
pcoenen
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 02.04.2010, 12:24
Location: Limburg
Contact:

Post by pcoenen »

using Zeos SVN rev 800 and Delphi 2010

Hi,
Same problem with unicode string parameter Query and SQLite. Patch from BraveCobra also works here :-).

Is it possible to add it in ZDbcSqLiteStatement.pas (Line 361)

361 stString, stUnicodeString, stBytes:
362 Result := GetEscapeString(SoftVarManager.GetAsString(Value));

Pascal
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN Rev 802

Mark
Image
Locked