Graham,

>Changing the app to native datetimes means I can't use control source  for
any dates as I'd have to assign the date time to a variable, cast it to a
date then place this in the text.value property.
>Does this mean the select statement in the ca is ignoring the cursorschema
property when its fetching data?

Whoa, don't panic yet. I'm late to this discussion, but if you want to deal
with the datetimes as just plain old dates in VFP and don't care about the
time portion being correctly written back to the backend, you CAN do it with
CursorAdapter without much trouble at all.

Just set up your CursorSchema property to define the cursor the way you want
it, including Date type for any datetime fields being queried. Then, when
you issue a CursorFill() be sure to include the first parameter as .T.,
which tells the adapter to actually use the CursorSchema you went to the
trouble of setting up.

.CursorSchema = "somefield C(25), somedate D"
.SelectCmd = ...
CursorFill(.T.)

However, in VFP9, a new property was introduced that forces use of the
CursorSchema without having to do the first param.

.UseCursorSchema = .T.

I set that property in my CursorAdapter first-level subclass and never worry
about it again.

This works just fine as long as you set it up one of these ways. You have a
date type in the cursor and when the data is updated to the backend, the
datetime is written to the database with 00:00:00 time portion.

David Stevenson 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.15/659 - Release Date: 1/30/2007
9:31 AM
 



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to