Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: RV and AllowSimultaneousFetch = .T.
Message
De
15/11/2004 08:56:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
BUG: RV and AllowSimultaneousFetch = .T.
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00961358
Message ID:
00961358
Vues:
100
Previous issue Thread #960734

Bug/Issue : 9 of 33

TITLE: Bug, VFP do bad API ODBC calls sequence with the AllowSimultaneousFetch = .T.,Fetchasneeded=.T. and INDEX ON combination

VERSION: 09.00.0000.1720 and VFP8SP1

EXPECTED:
No error, and if a error occur, the true ODBC error, and no cancel and close the Server cursor

OBSERVED:
- If you define a RV with
--- AllowSimultaneousFetch = .T. ( use a Server Cursor )
-- Fetchasneeded = .T.
-- indexes the RV before the last fetched row,
a ODBC error it is fired, this error is mistaken ( fixed on VFP9Beta ), and the RV is cut.

On repro code i put the detailed comment of the cause of this bug.

NOTE: tested on RV, but task that the CA have the same bug.

REPRO:
#DEFINE SERVERNAME (local)

CLEAR 

CLOSE DATABASES all

DELETE FILE TestSimultaneousFetch.dbc
CREATE DATABASE TestSimultaneousFetch

CREATE CONNECTION testConn CONNSTRING [driver=SQL SERVER;server=SERVERNAME;database=Northwind]
DBSETPROP('testConn',"CONNECTION","Asynchronous",.F.)

CREATE SQL VIEW testView1 REMOTE CONNECTION testConn SHARE as select * from categories
DBSETPROP('testView1','view', 'AllowSimultaneousFetch',.T.)
DBSETPROP('testView1','view', 'fetchasneeded', .T.)
DBSETPROP('testView1','view', 'fetchsize',1)

SELECT 0
USE testView1
? USED()
#IF VERSION(5)>800
	? CURSORGETPROP("RecordsFetched")
#ENDIF
? 'Busy testView1 ',SQLGETPROP(CURSORG("ConnectHandle"),"ConnectBusy")
*=RECCOUNT() && WorkAround
* next command fetch all the Server Cursor rows, but have two bugs:
* ODBC calls:
* .... fetching SQL_ROWSET_SIZE=0x1000 ! good, override the fetchsize
* .... BUG1 ( with fetchasneeded=.T. ) : Another <SQL_ROWSET_SIZE>=fetchsize !!!! ( fixing: ignore fetchasneeded )
* .... SQLExtendedFetch <SQL_FETCH_NEXT> return 1 
* .... fetch cycle
* .... SQLGetData columns loop
* .... BUG2 : <SQL_ROWSET_SIZE>=0 => Error Argument Invalid ( correct it is another SQLExtendedFetch )
* .... BUG3 : SQLCancel   => this clear the ODBC error ( fixing : remove this command on VFP C code  : fixed on VFP9 beta )
* .... SQLErrorW  => of course return (SQL_NO_DATA_FOUND) and  VFP convert it into ODBC out of resource ( fixed on VFp9b ) 
* .... PRB4 : SQLCancel : this is a bad design choice, best it is return error into VFP and leave to VFP developer to fix the error
* .... SQLCloseCursor
INDEX ON .F. TAG TTT
BROWSE
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform