AsDate / TDate Field
Posted: Fri 28 Jul 2017 21:47
Hello,
In Microsoft SQL Server you can declare DateTime and Date Fields.
When using SDAC you can set a Parameter like this way for a date-Field:
But when you select values from a MS DB with:
you only have "AsDateTime", which results in a cast error, when selecting a Date-Field.
In Delphi you also have "TDate". So it would be nice to have a "AsDate" Funktion also when you are using FieldByName. Is there any way to achieve this?
In Microsoft SQL Server you can declare DateTime and Date Fields.
When using SDAC you can set a Parameter like this way for a date-Field:
Code: Select all
qryExec.Params.ParamByName('StartDate').AsDate
Code: Select all
qrySelect.FieldByName('StartDate').As........
In Delphi you also have "TDate". So it would be nice to have a "AsDate" Funktion also when you are using FieldByName. Is there any way to achieve this?