>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.
I'm sorry if I gave the impression that case was changed with CursorFill... it's obviously not (and you get preserved case in the cSelectCmd parameter in .BeforeCursorFill() ) because VFp doesn't have to do anything to it before sending it into the method. It simply sends whatever you have put into the oCA.SelectCmd property.
The BeforeUpdate is another story, because VFP is constructing the SQL statement for you. Obviously, it changes the case because whoever wrote the code for CursorAdapter decided for some reason to go all lower-case, or the spec he/she was working from specified it that way. I can't think of a good reason for that, but there may be one.
>Also thanks for pointing out how the .BeforeCursorFill() can be used to build dynamic statements and make it generic! It is very useful.
I also use AfterCursorFill() for post-processing of the cursor, such as converting NULL or '01/01/1900' dates in SQL Server to {} dates in VFP (I use the ConversionFunc property to change it back on inserts/updates), and for indexing the cursor where needed.