Ver Fonte

* improve statementtype detection. Mantis #22723, patch by Lacak2

git-svn-id: trunk@22563 -
marco há 13 anos atrás
pai
commit
d2cc65aff0
1 ficheiros alterados com 7 adições e 2 exclusões
  1. 7 2
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

+ 7 - 2
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -592,8 +592,13 @@ begin
     // If the statementtype is isc_info_sql_stmt_exec_procedure then
     // override the statement type derrived by parsing the query.
     // This to recognize statements like 'insert into .. returning' correctly
-    if IBStatementType = isc_info_sql_stmt_exec_procedure then
-      FStatementType := stExecProcedure;
+    case IBStatementType of
+      isc_info_sql_stmt_select: FStatementType := stSelect;
+      isc_info_sql_stmt_insert: FStatementType := stInsert;
+      isc_info_sql_stmt_update: FStatementType := stUpdate;
+      isc_info_sql_stmt_delete: FStatementType := stDelete;
+      isc_info_sql_stmt_exec_procedure: FStatementType := stExecProcedure;
+    end;
 
     if FStatementType in [stSelect,stExecProcedure] then
       begin