Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Blank values update to null
Message
From
18/12/2004 11:52:51
 
 
To
17/12/2004 00:06:53
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00969931
Message ID:
00970323
Views:
23
Hello,

you can use the ConversionFunc property of the CursorAdapter.

e.g.

DEFINE CLASS yourCA AS yourCABaseClass
SelectCmd = "SELECT someField, someDate FROM someTable WHERE ..."
ConversionFunc = "someDate SQLDateFix"
.. other properties ..
ENDDEFINE


FUNCTION SQLDateFix(ldDate)
RETURN IIF(EMPTY(ldDate),.NULL.,ldDate)
ENDFUNC


this way you don't have to fiddle with this stuff in the user interface and keep the code where it really belong's to (the data layer)

Regards
Christian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform