You are not logged in.
Hi AB today i update mORMot to the actual Version and testet it
We use SynDBUniDAC.
But some of the changes from matkov throw unexpected SQL Errors with MySQL and MSSQL
I had to revert SynDBUniDac to the "old" Version.
MySQL Error:
Erste Gelegenheit für Exception bei $76A4A8B2. Exception-Klasse EMySqlException mit Meldung '#HY000Unerlaubte Mischung von Sortierreihenfolgen (latin1_german2_ci, IMPLICIT) und (utf8_general_ci, COERCIBLE) für Operation '=''. Prozess imsys.exe (7000)
with Query:
delete from tabellenbeziehungen where (beziehungsart = :("MZ_MDELizenzen"):) and (referenztabelle = :("monteure"):) and (referenzfeld = :("monteurid"):) and (bezug = :("DFCloud.Lizenzen"):) and (bezugsfeld = :("Lizenzcode"):) and (referenzwert = :(53):)
MS-SQL Error:
Erste Gelegenheit für Exception bei $76A4A8B2. Exception-Klasse EUniError mit Meldung 'Operandentypkollision: nvarchar(max) ist inkompatibel mit sql_variant'. Prozess imsys.exe (7000)
with Query:
SELECT stammdatenid f0, parentID f1, kategorie f2, auswahl f3, anzeigen f4, feld01 f5, hostwert f6, unplausibel_meldungstext f7, extrem_unplausibel_meldungstext f8 FROM stammdaten where (kategorie = :("Vorgangsgrund"):) order by stammdatenid
(and other select queries)
Removing the Prepare in line 768:
function TSQLDBUniDACStatement.DatasetPrepare(const aSQL: string): boolean;
begin
(fQuery as TUniQuery).SQL.Text := aSQL;
// TUniQuery(fQuery).Prepare;
fQueryParams := TUniQuery(fQuery).Params;
result := fQueryParams<>nil;
end;
solves the Problem also, but as i don't know what matkov used to do with the patch, i reverted complete to the former SynDBUniDAC.pas - i think i don't need the patch
Last edited by itSDS (2021-03-29 19:29:29)
Rad Studio 12.3 Athens
Offline
This is weird....
I don't know what to do...
Has anyone a clear idea?
The pull request was https://github.com/synopse/mORMot/pull/384
Which was mainly about supporting array binding, which helps a lot for bulk DB modification.
Offline
Since both error is collation related, I think it's may appears because in PR #384 Unicode is forced (in lines like below)
- here - https://github.com/synopse/mORMot/pull/ … 8R268-R277
- or may be here - https://github.com/synopse/mORMot/pull/ … 8R683-R685
Last edited by mpv (2021-03-29 20:53:05)
Offline
Thanks for the feedback.
Please try https://synopse.info/fossil/info/d1799318d7
The Unicode logic seemed inverted - Unicode should better be forced for FPC only.
If it is not enough, we will need to investigate further about the Prepare early call.
Offline