[patch_done] Fix datetime to string Lazarus program MySql
Posted: 21.05.2011, 20:13
Need to replace all stUnicodeString to stString for Lazarus in other modules for fix Lazarus crashes
It seems a problem in Lazarus and not in zeos.
Discussion
http://zeos.firmos.at/viewtopic.php?t=3179
It seems a problem in Lazarus and not in zeos.
Discussion
http://zeos.firmos.at/viewtopic.php?t=3179
Code: Select all
Index: src/dbc/ZDbcMySqlUtils.pas
===================================================================
--- src/dbc/ZDbcMySqlUtils.pas (revision 903)
+++ src/dbc/ZDbcMySqlUtils.pas (working copy)
@@ -243,14 +243,22 @@
(PMYSQL_FIELD(FieldHandle)^.charsetnr = 83) or
((PMYSQL_FIELD(FieldHandle)^.charsetnr>=192) and
(PMYSQL_FIELD(FieldHandle)^.charsetnr<=210)) )(* the end is not fix ??? *) then
- Result := stUnicodeString
+ {$IFDEF FPC}
+ Result := stString
+ {$ELSE}
+ Result := stUnicodeString
+ {$ENDIF}
else
if ( // UCS2
(PMYSQL_FIELD(FieldHandle)^.charsetnr = 35) or
(PMYSQL_FIELD(FieldHandle)^.charsetnr = 90) or
((PMYSQL_FIELD(FieldHandle)^.charsetnr>=128) and
(PMYSQL_FIELD(FieldHandle)^.charsetnr<=146)) )(* the end is not fix ??? *) then
- Result := stUnicodeString
+ {$IFDEF FPC}
+ Result := stString
+ {$ELSE}
+ Result := stUnicodeString
+ {$ENDIF}
else
Result := stString;
FIELD_TYPE_ENUM: