Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing .dbf files with mysql table
Message
De
10/08/2013 14:33:06
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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:
01580243
Message ID:
01580245
Vues:
77
>Hi
>
>I am considering replacing .dbf files with mysql table, but I have some doubts:
>
>1-Which seems the best approach: Open database and keep it open to all forms, or open and close it in each form ?
>
>2- Suppose I have a grid from table client.dbf. Which is the sintax to access
> table, supposing database is already open ?
>
>3- If I edit some fields in grid, how will they be replaced in mysql table ?

From the nature of your questions, I'm thinking you may not have much client-server experience with VFP and a back-end database (?)

There is at least one VFP-MySQL book available: http://www.hentzenwerke.com/catalog/mysqlvfp.htm ( a bit dated, though )

There is some information in VFP help if you type [help client server] in the Command window. In very general terms you will need to:

1. Install a MySQL ODBC or ADO driver on your computer
2. Determine the connection string or information you need to connect to MySQL from VFP. A good resource is http://www.connectionstrings.com/mysql/
3. Choose a method for VFP to interact with MySQL:
- Remote Views
- SQL Pass-Through
- CursorAdapters (this is the only choice if you use ADO to connect to MySQL)

Each of those methods can create a VFP cursor, which you use like any other VFP cursor or table. You can check in VFP help for each of those methods e.g. [help sql pass-through].

You can also search for help on these topics at the Fox Wiki: http://fox.wikis.com/wc.dll?wiki~VisualFoxProWiki
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform