Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug about select command
Message
De
26/12/2006 23:36:01
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01180172
Message ID:
01180406
Vues:
18
>VFP does open table test during query execution but it gets closed after query is completed. You can see it by running following code
>
>CREATE TABLE test (testfld c(10))
>USE
>USE test ALIAS atest
>SELECT *, UdfSusp() FROM atest INTO CURSOR qtest
>
>RETURN
>
>FUNCTION UdfSusp
>SET
>SUSPEND
>RETURN SPACE(1)
>
>To get result you want, create cursor test beforehand to prevent VFP from opening table test with alias test.
>
>CREATE TABLE test (testfld c(10))
>USE
>USE test ALIAS atest
>CREATE CURSOR test (DUMMY C(1))
>SELECT * FROM atest INTO CURSOR test
>
>
>>Try that code. The last line will give error. Because test table opened with "use test alias atest" command, so VFP won't open an alias for test table when running select command. If VFP don't open remotely test table aliased "test" why SELECT * FROM atest INTO CURSOR test command gives error?
>>
>>
>>
>>CREATE TABLE test (testfld c(10))
>>
>>USE
>>
>>USE test ALIAS atest
>>
>>SELECT * FROM atest INTO CURSOR qtest
>>
>>select test
>>
>>
Is it because Sql reads from disk and takes the original table name ? and is it the same behavior with VFP9 with buffering = .t. ??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform