Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MySQL – Remote views
Message
De
01/02/2001 17:26:26
 
 
À
31/01/2001 18:40:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00470201
Message ID:
00471507
Vues:
40
Hello, Julie.

Hmmmm. :)

There a lot of issues about the import.

Let's try to figure out some rules:

1. MySQL doesn't support the Logical DataType. You should convert it to Numeric before the import.
2. The indexes are different from those under VFP. For example, the expression 'first_name'+'last_name' cannot be used under MySQL. It should be 'first_name,last_name'. As you can see, under MySQL is possible to use in index expression belonging to different datatype, like follows: 'first_name,last_name,date_of_birth,security_number'. It work perfectly.
3. Under MySQL extensive use of indexes is disrecommended (unlike VFP). The index should exist only you want very often a small set of data (under 25% from total).
4. Another issue is the sintax conversion. For example, I use indexes like this one: 'INDEX ON ALLTRIM(last_name) TAG name', to avoid the situation when the user place a Space before the name, forcing it to be the first one in the index. Unfortynatelly, MySQL doesn't support the ALLTRIM function. It has another one, named TRIM. As you can see, it is necessary a conversion of the VFP functions to MySQL functions. Some of them are not supported, others have another name. Tough problem.
5. You have to be aware that the Memo and General datatype doesn't have an direct equivalent under MySQL. The closest equivalent is TEXT for Memo and BLOB for general. But both have three varians: TINYTEXT (2^8 chars), MEDIUMTEXT (2^16 chars) and LONGTEXT (2^32 chars). The same rule applies to BLOB. You should chose what to use.
6. The concept of a 'free table' is not supported under MySQL. Before importing a table, you should create a database, then create a table. For this reason, you can import an entire VFP database, but the stored procedures are not supported and the relational integrity are not supported, too. Anyway, I was able to import a database into MySQL, and I am sure you can too.
7. Another big problem is the parameterized wiew. By default, the ODBC driver tries to optimize the width of the column, so, if the first result of an view is 'MIKE' and the second should be 'GRIGORE', the REQUERY function fails. It is necessary to check the checkbox 'Don't optimize column width' under ODBC in Control Panel. I've gone crazy about this, and Erik Moore enlightened me. Thanks again, Erik! (if you read this... :)
8. Again, about the views: It seems to be an ODBC driver problem, but if you create a remote view from a table in MySQL, the ODBC driver don't give the necessary information, such column widths. As result, you'll be forced to set the width of fields manually. And if after you alter the MySQL table, you'll be forced to set again the width of each field of the view which have worked. This is very frustrating, and I strongly suggest to build a app for this goal.

Those are some of things you should be aware of. Try to import the table. If you have problems, I'll be glad to help.

Grigore Dolghin.
Grigore Dolghin
Class Software.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform