Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA Date Field returns VARTYPE of DateTime
Message
From
26/01/2023 01:29:14
 
 
To
24/01/2023 00:07:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01685899
Message ID:
01685961
Views:
23
Hi Lutz,

> #1 It's never a good idea to name a field, var, PEM like a build in function

So far, I have no problems naming fields, vars like a built-in function.

> #2 GetCursorObject and GetFieldValue are not VFP native, this looks like some framework. So it's somewhere in the code of this framework. Even the whole idea to
> handle data through objects looks strange from a VFP POV.

You are right. Those methods are part of my framework. It simply loops thru the collection of Cursors and returns an object reference of the CA with the specified Alias, which I have been doing for the longest time. I just wonder why the field value returned was DateTime instead of Date. Both Cursorschema property and the actual MySQL table are dates.

Thanks.


>>Hi All,
>>
>>I typically use a DataEnvironment class then drop CursorAdapter classes in it as my Data Tier.
>>
>>I recently discovered this 'bug'.
>>
>>Suppose I created a boInvoice (DE) class, and dropped a oCustomer, oInvoiceHeader and oInvoiceDetail (CA) in it.
>>
>>So, when I do this:
>>
>>
>>oInvoice = NEWOBJECT( 'boInvoice' )
>>oInvoice.oInvoiceHeader.CursorFill()
>>? oInvoice.oInvoiceHeader.GetFieldValue( "Date" )    && GetFieldValue is one of my methods - this returns a certain date value
>>
>>
>>but if I create an object reference like so:
>>
>>
>>loInvoiceHeader = oInvoice.GetCursorObject( "InvoiceHeader" )    && method return object reference of oInvoiceHeader
>>? loInvoiceHeader.GetFieldValue( "Date" )                 && this returns a DateTime value!!!
>>
>>
>>Any explanations on this? Thanks In Advance.
>
>#1 It's never a good idea to name a field, var, PEM like a build in function
>#2 GetCursorObject and GetFieldValue are not VFP native, this looks like some framework. So it's somewhere in the code of this framework. Even the whole idea to handle data through objects looks strange from a VFP POV.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform