Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Oh depending on the hosting platform, MySQL is case-sensitive on the table names in Linux but not case-sensitive in Windows. However in both platforms, field names are not case-sensitive. This is because MySQL tables are implemented as individual physical files in the OS. I am not too sure about MacOS though.
And actually I didn't do anything in the BeforeCursorFill event and surprisingly the .cSelectCmd in there has the lettercase preserved! I am wondering why the cUpdateInsertCmd in BeforeUpdate will have the lettercase of the table name turned into lowercase.
Also thanks for pointing out how the .BeforeCursorFill() can be used to build dynamic statements and make it generic! It is very useful.
>David,
>
>I'm glad that worked. So MySQL is case-sensitive on table names? I assume you don't have the problem on CursorFill() because you're putting the entire Select statement, including table name, into the .SelectCmd property for that.
>
>However, if needed for generic code, you can do the same trap in .BeforeCursorFill() by changing the cSelectCmd incoming parameter (which also persists for CursorRefresh() ). Trapping the cSelectCmd this way allows for generic code to add on extra stuff to the pre-programmed SelectCmd, such as adding a dynamic ORDER BY clause or a WHERE clause (or addition to an existing WHERE clause).
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement