fcl-db: sqldb: fixes AV when SQL is empty, Cursor is not allocated yet. Bug #29124

git-svn-id: trunk@32566 -
This commit is contained in:
lacak 2015-12-02 06:37:49 +00:00
parent 8df979e5e8
commit 6f9d542d81

View File

@ -1228,11 +1228,11 @@ begin
if not ATransaction.Active then
ATransaction.MaybeStartTransaction;
try
SQL := TrimRight(SQL);
if SQL = '' then
DatabaseError(SErrNoStatement);
SQL := TrimRight(SQL);
if SQL = '' then
DatabaseError(SErrNoStatement);
try
Cursor := AllocateCursorHandle;
Cursor.FStatementType := stUnknown;
If LogEvent(detPrepare) then