Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to open table from another server (MySQL)
Message
De
21/09/2014 03:29:16
 
 
À
21/09/2014 00:20:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01607913
Message ID:
01607919
Vues:
57
>I'm using VFP with MySQL database.
>
>I know how to open table from other database but still in the same server:
>
>select * from office1.invoice
>
>
>but how to open table from other server, eg, server: sony, database: office1, table: invoice, password: mypass
>
>thanks for the help

You'll have to create a second connection.

If you create a FEDERATED table in the first server, the connection is managed by MySQL itself (see http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html). But I think the simpler alternative would be to create a second VFP connection in your client machine for the second server.

The first scenario allows you to join tables immediately at the statement level. For instance,
SELECT atfirst.* FROM office1.invoice atfirst INNER JOIN office1.sony_invoice atsecond ON some_condition
(note that the federated table is a table in your office1 database, similar to a regular remote connection in a VFP database).

Using a second connection in VFP will free you from changing the structure of your MySQL database and the need to keep a vigilant eye on any table changes that may occur. If you want to join tables from the two servers, you'll have to create separate VFP cursors and join them locally.
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform