Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug about select command
Message
De
26/12/2006 16:46:02
 
 
À
26/12/2006 09:55:28
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
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:
01180353
Vues:
22
>>To speed up frequent selects, it's an old trick to keep the tables open by issuing USE statements for all the relevant tables early in the code. If you USE a table ALIAS something, then the alias is treated exactly like it was the name of the table. AFAIK it's "always" been like that. Try this
>
>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?

Because table Test is in use, although under another alias. You can't select into an open table. And you can't Select test because test is aliased atest. Try this
Use yourtable alias xyz in 10
Select yourtable && Error
Select select('yourtable') && OK
Select xyz && OK
I don't want to argue with you, but if you did NOT get an error on the line "Select yourtable", then the whole idea with Alias would be inconsistent. At least that's how I see it.


>
>
>CREATE TABLE test (testfld c(10))
>
>USE
>
>USE test ALIAS atest
>
>SELECT * FROM atest INTO CURSOR qtest
>
>select test
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform