Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursoradapter keeps the lettercase
Message
 
À
27/09/2005 06:47:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Database:
MySQL
Divers
Thread ID:
01053310
Message ID:
01053723
Vues:
10
Hi David,
After strtran-ing the cUpdateInsertCmd in the BeforeUpdate event as suggested, it works flawlessly. Thanks for pointing me to the right direction! Since I use only one table in the CA, the following code does the job:

cUpdateInsertCmd = strtran(cUpdateInsertCmd,this.Tables,this.Tables,1,1,1)

>
>>Is there a way to make the cursoradapter to keep the case of the table name when generating the update statement? It seems to turn the table name into all lowercase.
>
>You can interrupt the process just before the update is sent by putting code into the .BeforeUpdate event method to modify the statement that will be sent (it's in the cUpdateInsertCmd incoming parameter, which you can change as you like). Note that the cDeleteCmd listed as a parameter is just used if you have specified .UpdateType = 2 (delete followed by insert).
>
>For Inserts or Deletions, you can trap the commands in the .BeforeInsert and .BeforeDelete methods (parameters are cInsertCmd and cDeleteCmd).
>
>You could use a STRTRAN for each subclass of CA to patch up the table name for that subclass, or you could do a generic version that looks at values in the .Tables property and uses it/them to create STRTRAN statement(s) to change the SQL command before it is executed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform