浏览代码

* Also in ExecuteDirect the allocation and preparation of a cursor should be
as close together as possible

git-svn-id: trunk@13001 -

joost 16 年之前
父节点
当前提交
934a6b159f
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      packages/fcl-db/src/sqldb/sqldb.pp

+ 1 - 4
packages/fcl-db/src/sqldb/sqldb.pp

@@ -552,15 +552,12 @@ begin
   if not ATransaction.Active then ATransaction.StartTransaction;
 
   try
-    Cursor := AllocateCursorHandle;
-
     SQL := TrimRight(SQL);
-
     if SQL = '' then
       DatabaseError(SErrNoStatement);
 
+    Cursor := AllocateCursorHandle;
     Cursor.FStatementType := stNone;
-
     PrepareStatement(cursor,ATransaction,SQL,Nil);
     execute(cursor,ATransaction, Nil);
     UnPrepareStatement(Cursor);