Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select after choose 2 fields
Message
 
To
12/03/2000 22:56:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00344762
Message ID:
00344851
Views:
25
>Hi Nick
>
>Sorry too many questions, but is the first time i doing this, i try your code like bellow, and
>
>create sql view myView1 as select forart.c_codigo,forart.c_sartigo,fornecedores.c_descri ;
>from forart ;
>left outer join fornecedores ;
>on fornecedores.c_codigo=forart.c_codigo;
>where forart.c_artigo=thisform.text1.value

You do this just once to create a view in your database. This should not be a part of your form controls code.

Then you
USE myView1
SELECT myView1

Or you put myView1 in your Dataenvironment. Since it has the parameters which may not be available when the view opens the first time you may set
NoDataOnLoad = .t. for this cursor. I would recommend you also to use variables for your view parameters, not directly thisform.text1.value. You need just make sure that the variable is available whn you REQUERY your view and that it contains proper value.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform