소스 검색

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

git-svn-id: trunk@22563 -
marco 13 년 전
부모
커밋
d2cc65aff0
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  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
     // If the statementtype is isc_info_sql_stmt_exec_procedure then
     // override the statement type derrived by parsing the query.
     // override the statement type derrived by parsing the query.
     // This to recognize statements like 'insert into .. returning' correctly
     // 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
     if FStatementType in [stSelect,stExecProcedure] then
       begin
       begin