Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT ... SELECT and row buffering, bug or not bug ?
Message
De
23/12/2004 02:22:38
Walter Meester
HoogkarspelPays-Bas
 
 
À
22/12/2004 11:07:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00971447
Message ID:
00971689
Vues:
31
Hi Fabio,

I'd say this is undocumented behaviour. the INSERT in the first example is limited to inserting one record, the second does not have this limitation. Therefore I guess that the second implementation automatically updates any record that is inserted.

This behaviour probably is to be expected as this would make it consistent for INSERT INTO .... SELECT ... regardless of how many records are returned by the select statement. Otherwise you will have buffered data in the case only 1 record is returned or either only the last record added or none at all if multiple records are returned.

Walter,


>Run this indirect way, the record it is buffered:
>
>CREATE CURSOR PIVOT (FF I)
>APPEND BLANK
>
>CREATE CURSOR abba (f1 I)
>CURSORSETPROP("Buffering",3)
>
>SELECT TOP 1 00 FROM PIVOT ORDER BY 1 INTO ARRAY vv
>INSERT INTO ABBA FROM ARRAY vv
>? 'INSERT FROM ARRAY',GETFLDSTATE(-1),RECCOUNT()
>
>
>Run this direct way, the record it is updated:
>
>CREATE CURSOR PIVOT (FF I)
>APPEND BLANK
>
>CREATE CURSOR abba (f1 I)
>CURSORSETPROP("Buffering",3)
>
>INSERT INTO ABBA SELECT TOP 1 200 FROM PIVOT ORDER BY 1
>DEBUGOUT 'INSERT SELECT',GETFLDSTATE(-1),RECCOUNT()
>
>
>Bug,
>undoc behaviour
>doc behaviour ?
>
>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform