Android Question JRDC2 error

marcick

Well-Known Member
Licensed User
Longtime User
I'm trying to move my code from JRDC to JRDC2 but now I get an error on the server when I use ExecuteQuery2 from the client.
The line in JRDC2 that generate the error is this

B4X:
Dim data() As Byte = ser.ConvertObjectToBytes(res)

And the error is:

B4X:
java.lang.RuntimeException: java.lang.RuntimeException: Cannot serialize object: 2015-12-0412:07:08.0

Any hint ?
 

b4auser1

Well-Known Member
Licensed User
Longtime User
Check this:
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you but, yes, it is.
The error appears also in the original JRDC2 source code
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
that error I suppose is related to a column Timestamp or DateTime (I have both types in the MySQL db)
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
B4X:
sql.RDC_Sync = SELECT * FROM `records` WHERE (( `Pwd` = ? OR `Pwd` = ?) AND `Index` > ? AND `Device` NOT LIKE ?)
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
something is changing but have other errors and need to understand better tomorrow.
I have a bigint(20) column also. Could it create problems in serializator ?
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Solved. The problem was that using "DATE_FORMAT(sdate,'%d %m %Y')" the column name that is returned to the client is not "sdate" but "DATE_FORMAT(col3,'%d %m %Y')" ....

So I have modified the query using "AS"

B4X:
DATE_FORMAT("sdate",'%d %m %Y') AS "sdate"

Everything seems to works fine now.
This foum is better than a school.
Thanks again !
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…