B4J Question What type should the variable be, when importing Date from DB?

Sifu

Active Member
Hello,

it's looks that importing data from mariadb with jRDC is very very strict, causing errors which take a lot of time to understand. (no offence, no doubt I'm the biggest cause)

If I import via Select a row from DB and a column has date like yyyy-mm-dd, should the variable where this data is assigned to be a String or something else?

Other way around: when updating or inserting a row in DB and a field has yyyy-mm-dd, and the column is DATE then it returns an error, if it is VARCHAR then it's ok.
How to solve this as the column needs to be date so that there is no possibility to put other data there.

Thank you for your help.
 

DonManfred

Expert
Licensed User
Longtime User
like yyyy-mm-dd
This format can only apply to a string.
You need to parse this string to a long in B4X using the dateutils methods.
 
Upvote 0
Top