Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and query
Message
From
18/12/1997 03:32:23
 
 
To
17/12/1997 15:42:39
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00066710
Message ID:
00066836
Views:
24
>Hello!
>
>I'm doing a form where i have i grid object and the recordsource property is a sql select command:
>
>ThisForm.Grid1.RecordSourceType = 4
>ThisForm.Grid1.RecordSource = "SELECT DISTINCT Nota.cod_nota, Nota.nota_num, Nota.razao_soc,;
> Prodnota.cod_prod, Produtos.desc_prod;
> FROM poadesp!nota, poadesp!prodnota, poadesp!forneced, poadesp!produtos;
> WHERE ALLTRIM(ProdNOTA.cod_prod) = ALLTRIM(PRODUTO);
> AND PRODUTOS.COD_PROD = PRODNOTA.COD_PROD;
> AND Prodnota.cod_nota = Nota.cod_nota;
> INTO CURSOR PESQUISA"
>
>But the vfp shows me a message saying "Sintax Error"
>
>Anyone knows where is the wrong?
>
>Thank
>
>Anderson Reis Girardi

Do not use 'INTO CURSOR' with RecordSourceType=4.
If you want to acces the cursor while you are runing the form,than first run the SQL statement wih 'INTO CURSOR PESQUISA' and then set the RecordSourceTupe property to 1, and the RecordSource to the desired alias ('PESQUISA')
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform