Browse Source

fcl-db: interbase: better detection if stored procedure is selectable i.e. returns resultset (or output parameters)

git-svn-id: trunk@30804 -
lacak 10 years ago
parent
commit
692398e195
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

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

@@ -731,7 +731,7 @@ begin
     BlockSize:=isc_vax_integer(@resbuf[1],2);
     IBStatementType:=isc_vax_integer(@resbuf[3],blockSize);
     assert(resbuf[3+blockSize]=isc_info_end);
-    // 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 derived by parsing the query.
     // This to recognize statements like 'insert into .. returning' correctly
     case IBStatementType of
@@ -753,6 +753,7 @@ begin
         if isc_dsql_describe(@Status[0], @Statement, 1, SQLDA) <> 0 then
           CheckError('PrepareSelect', Status);
         end;
+      FSelectable := SQLDA^.SQLD > 0;
       {$push}
       {$R-}
       for x := 0 to SQLDA^.SQLD - 1 do with SQLDA^.SQLVar[x] do