Página 1 de 1

Field Date Edit (for SQL Databases)

Publicado: Jue May 10, 2012 10:24 am
por Pedro Sousa e Faro
Hi ,
Since our Xailer App's only work with MSSQL Server , the problem is that
MSSQL in Columns type "dateTime" only acepts dates > = 1753.
To validate the input we must insert a validation on "exit method" of any
date. "
Is ther any better way to validate this situation
Regards
Pedro Faro

Field Date Edit (for SQL Databases)

Publicado: Jue May 10, 2012 11:43 am
por ignacio
Pedro Sousa e Faro escribió el jue, 10 mayo 2012 10:24Hi ,
Since our Xailer App's only work with MSSQL Server , the problem is that
MSSQL in Columns type "dateTime" only acepts dates > = 1753.
To validate the input we must insert a validation on "exit method" of any
date. "
Is ther any better way to validate this situation
Regards
Pedro Faro
You can try to overload TADoRecords:FieldPut() method. Something like this:
CLASS TAdoRecords FROM XAdoRecords
METHOD FieldPut( n, v )
END CLASS
METHOD FieldPut( n, v )
IF Valtype( v ) == "D" .AND. Year( v ) < 1753
v := NIL
ENDIF
RETURN Super:FieldPut( n, v )

Be aware that will do the job with any ADO connection.
Regards,