Pārlūkot izejas kodu

fcl-db: odbc: partially revert #49049

git-svn-id: trunk@49051 -
ondrej 4 gadi atpakaļ
vecāks
revīzija
6b0d010a67
1 mainītis faili ar 4 papildinājumiem un 9 dzēšanām
  1. 4 9
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

+ 4 - 9
packages/fcl-db/src/sqldb/odbc/odbcconn.pas

@@ -873,15 +873,10 @@ begin
 
 
     if (Res<>SQL_NO_DATA) then ODBCCheckResult( Res, SQL_HANDLE_STMT, ODBCCursor.FSTMTHandle, 'Could not execute statement.' );
     if (Res<>SQL_NO_DATA) then ODBCCheckResult( Res, SQL_HANDLE_STMT, ODBCCursor.FSTMTHandle, 'Could not execute statement.' );
 
 
-    // go to first selectable result - see issue #38664
-    ODBCCursor.FSelectable:=False;
-    while not ODBCCursor.FSelectable and ODBCSuccess(Res) and
-      ODBCSuccess(SQLNumResultCols(ODBCCursor.FSTMTHandle, ColumnCount)) do
-      begin
-      ODBCCursor.FSelectable:=ColumnCount>0;
-      if not ODBCCursor.FSelectable then
-        Res:=SQLMoreResults(ODBCCursor.FSTMTHandle);
-      end;
+    if ODBCSuccess(SQLNumResultCols(ODBCCursor.FSTMTHandle, ColumnCount)) then
+      ODBCCursor.FSelectable:=ColumnCount>0
+    else
+      ODBCCursor.FSelectable:=False;
 
 
   finally
   finally
     // free parameter buffers
     // free parameter buffers