using X# 2.21 and XS2ADO 5.0.6 to connect to a Postgres 17 Database
I've a tight loop used to populate a bArrayServer from an AdoRecordset and I'm facing a little issue with date fields.
When a date is retrieved, FieldType is 133 which is an AdoDataTypeEnum, as per xs2ado documentation, is "adDBDate 133 - A date value (yyyymmdd) (DBTYPE_DBDATE)."
Instead I get a date from System.DateTime that has a format of "dd/mm/yyyy 00:00:00" so it cannot be stored in the field of bArrayServer defined as type "D" (I get a blank field).
AdoSetTimeAsDate is set to TRUE.
the code looks like this:
Code: Select all
LOCAL odbInvoicePayments AS AdoRecordset
[...]
SELF:oasInvoicePayments:Append()
FOR y := 1 UPTO dwFields
cFieldName := Lower( odbInvoicePayments:Fields:Item[ y ]:Name ) // for debugging purpose
uFieldType := odbInvoicePayments:Fields:Item[ y ]:Type // for debugging purpose
uValue := odbInvoicePayments:FIELDGET( y )
SELF:oasInvoicePayments:FIELDPUT( y, uValue )
NEXT
SELF:oasInvoicePayments:Commit()
[...]
Thanks
Stefano