Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursoradapter keeps the lettercase
Message
From
29/09/2005 19:03:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Database:
MySQL
Miscellaneous
Thread ID:
01053310
Message ID:
01054717
Views:
16
>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.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform