Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug about select command
Message
From
26/12/2006 16:46:02
 
 
To
26/12/2006 09:55:28
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01180172
Message ID:
01180353
Views:
20
>>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
>
>
Previous
Reply
Map
View

Click here to load this message in the networking platform