Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use MS SQL from Foxpro
Message
 
To
05/01/2000 16:47:43
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00313537
Message ID:
00313550
Views:
35
Hi Joel,

Have you considered using a parameterized view? This would eliminate your having to change the SQL SELECT "variables" for each iteration, and would also preclude the need to "open" the SQL table.

To accomplish this in the View Designer, select the Filter tab (items in this tab populate the WHERE clause of the SQL statement). Under the "Example" column, instead of a constant (ie, "MYVALUE"), use a variable name preceded by a question mark (ie, ?lcMyValue ).

Now, whenever you want a new set of records in the view, populate lcMyValue with your desired value and issue the command REQUERY( "MyViewName" ).

HTH.

>How do I use an SQL table from Foxpro???
>
>I am able to connect and setup a View, but I have to build a select statement that narrows down to one (or a few) records in the SQL table. If I just try to "open" the SQL table, it will download *ALL* of the table and can take MANY MANY minutes. SO my view just gets the ONE record I want, but to go to another record, I must close the view, change the select statement memory variables and open the table again. It is literally 100 times faster to use Foxpro on a copy of the SQL table, but I need to use teh real SQL data.
>
>HOW DO I OPEN A SQL TABLE????
>
>I do appreciate your help!!!!!
>Joel
>Houston, TX
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform