S sigster Active Member Licensed User Longtime User Jul 2, 2020 #1 Hi I am using jdbcSQL and mysql when I try to get date I get this error (SQLException) java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date B4X: Dim adate As String = Crsr.GetString("VV_date") If adate = Null Then adate = "" row(8) = " " & adate Last edited: Jul 2, 2020
Hi I am using jdbcSQL and mysql when I try to get date I get this error (SQLException) java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date B4X: Dim adate As String = Crsr.GetString("VV_date") If adate = Null Then adate = "" row(8) = " " & adate
makis_best Well-Known Member Licensed User Longtime User Jul 2, 2020 #2 I think this caused by JDBC, add zeroDateTimeBehavior=convertToNull at the end of the jdbc connection string. That will fix the problem. Do something like this.. B4X: jdbc:mysql://127.0.0.1:3306?zeroDateTimeBehavior=convertToNull Upvote 0
I think this caused by JDBC, add zeroDateTimeBehavior=convertToNull at the end of the jdbc connection string. That will fix the problem. Do something like this.. B4X: jdbc:mysql://127.0.0.1:3306?zeroDateTimeBehavior=convertToNull
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2020 #3 Nulls and strings don't go well together. If the above suggestion hasn't solved the issue then please post the full error message. Upvote 0
Nulls and strings don't go well together. If the above suggestion hasn't solved the issue then please post the full error message.