Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursoradapter keeps the lettercase
Message
 
To
27/09/2005 06:47:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Database:
MySQL
Miscellaneous
Thread ID:
01053310
Message ID:
01053723
Views:
9
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform