General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only