Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create SQL VIEW REMOTE (gets all records!)
Message
From
31/01/2003 20:06:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Create SQL VIEW REMOTE (gets all records!)
Miscellaneous
Thread ID:
00747928
Message ID:
00747928
Views:
48
To create a view of a subset of remote data stored on a Linux server using MySQL, I use the following VFP 7 sample command:

OPEN DATABASE MyData
CREATE SQL VIEW MyView REMOTE CONNECTION MyRemote as ;
SELECT title FROM titles WHERE title=?xTitle Limit 10

(FYI the titles table has 1.5 million records and lots of fields)

The system then stalls (waits)...
When I examine a server process list (using the tool in MySQLFront), the server is busy processing the folling request:

SELECT * FROM titles <--- Yikes!

Obviously, this step is going to take a while to download this HUGE file. My question is why does VFP need to get all the records in the table when I am only CREATING the view? Is it the fact that "Limit 10" is not native to VFP? I can't use "TOP 10" because MySQL does not understand that. None of that should matter anyway because the first command VFP sends (by itself) is "SELECT * FROM titles"

I am wondering if VFP and MySQL are not compatible in some way (can anyone verify this situation on their system?). I have tried to solve this for months, and it seems odd that I am the only one out there who seems to be having an issue with such a basic operation. Help!
Next
Reply
Map
View

Click here to load this message in the networking platform