I use B4J 5.9 , jSQ 1.50 and database is MySQL
I have a table name table1 with 3 fields
-id is char(5)
-check_date is datetime
-check_str is varchar(255)
Data test 1 record:
-id = 1
-check_date = 0000-00-00 00:00:00
-check_str = 0000-00-00 00:00:00
I try 3 steps
1.
I get error "java.lang.RuntimeException: java.lang.NumberFormatException: empty String".
I check log in DBUtils.ExecuteMap ,error occur at "check_date" field.
------------------------------------------------------------------------------------------------
2.
No error , but I get id = 1 ,check_str is empty string
------------------------------------------------------------------------------------------------
3.
No error , but I get id = 1 , check_date1 = 00-00-0000 ,check_str is empty string
------------------------------------------------------------------------------------------------
This is bug ?
Regards,
PMT
I have a table name table1 with 3 fields
-id is char(5)
-check_date is datetime
-check_str is varchar(255)
Data test 1 record:
-id = 1
-check_date = 0000-00-00 00:00:00
-check_str = 0000-00-00 00:00:00
I try 3 steps
1.
B4X:
cmd = "select id, check_date , check_str from table1 where id = ?"
id = 1
res= DBUtils.ExecuteMap(con,cmd,Array As String(id))
I get error "java.lang.RuntimeException: java.lang.NumberFormatException: empty String".
I check log in DBUtils.ExecuteMap ,error occur at "check_date" field.
------------------------------------------------------------------------------------------------
2.
B4X:
cmd = "select id , check_str from table1 where id = ?"
id = 1
res= DBUtils.ExecuteMap(con,cmd,Array As String(id))
No error , but I get id = 1 ,check_str is empty string
------------------------------------------------------------------------------------------------
3.
B4X:
cmd = "select id, DATE_FORMAT(check_date,'%d-%m-%Y') as check_date1 , check_str from table1 where id = ?"
id = 1
res= DBUtils.ExecuteMap(con,cmd,Array As String(id))
No error , but I get id = 1 , check_date1 = 00-00-0000 ,check_str is empty string
------------------------------------------------------------------------------------------------
This is bug ?
Regards,
PMT