mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:49:17 +02:00
* Fix for error-handling when a TSQLQuery is opened.
git-svn-id: trunk@2662 -
This commit is contained in:
parent
619541d0cc
commit
f1fc3a316d
@ -725,7 +725,8 @@ end;
|
|||||||
procedure TSQLQuery.InternalClose;
|
procedure TSQLQuery.InternalClose;
|
||||||
begin
|
begin
|
||||||
if StatementType = stSelect then FreeFldBuffers;
|
if StatementType = stSelect then FreeFldBuffers;
|
||||||
if not IsPrepared then (database as TSQLconnection).UnPrepareStatement(FCursor);
|
// Database and FCursor could be nil, for example if the database is not assigned, and .open is called
|
||||||
|
if (not IsPrepared) and (assigned(database)) and (assigned(FCursor)) then (database as TSQLconnection).UnPrepareStatement(FCursor);
|
||||||
if DefaultFields then
|
if DefaultFields then
|
||||||
DestroyFields;
|
DestroyFields;
|
||||||
FIsEOF := False;
|
FIsEOF := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user