Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug about select command
Message
 
 
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:
01180362
Views:
14
This message has been marked as the solution to the initial question of the thread.
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
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform