Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select From Into???
Message
From
31/01/2005 09:57:12
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
00982225
Message ID:
00982233
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
Hi Ron,

>I have a grid on a form that I want to populate using a selected portion of the records in a table. Basically, when a person logs on I find their logon ID and get the records from the table that match.
>
>I thought the best way to do this was with a query and made that the recordsourcetype of the grid. But in my form controls that refresh the query, I am running into a select problem. I want to issue a SELECT this.field, that.field FROM mytable INTO query.qpr WHERE name = thename.
>
>Foxpro reports that the code has a syntax error and I find it is related to the INTO clause. And Intellisense doesn't seem to allow an INTO for a query, only for a cursor or array.
>
>What am I doing wrong, or is there a better way to fill the grid.
>
>TIA

Try:
SELECT this.field, that.field FROM mytable WHERE name = thename  INTO TABLE query
In this case, VFP will generate a DBF file. You can change "Into Table" for "Into Cursor" for VFP to generate a cursor.
Good luck!
Erick
Força Sempre!
Strength Always!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform