mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +02:00
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:
parent
8df979e5e8
commit
6f9d542d81
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user