Hope someone can help!
We have recently upgraded our JDBC driver in our development environment to version 5.1.10 but have been experiencing problems as a result. In addition, our ebase development environment has forms facing off to MySQL databases on two different servers. One server is MySQL 5.0.33 and the other is 5.1.48. We are only experiencing these issues on version 5.0.33.
The error we are getting is whilst we are running a form and we are using any functions in queries such as TIME_FORMAT or DATE_FORMAT we get an error saying:-
* Unable to set value for field TBLREPORTS2-DESCRIPTION, value [B@149b1dd not compatible with type CHAR *
Anyone with any ideas please?
Thanks,
Llyr
Problems using newer JDBC drivers with MySQL
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 7
- Joined: Fri Dec 17, 2010 2:34 pm
-
- Ebase User
- Posts: 7
- Joined: Fri Dec 17, 2010 2:34 pm
-
- Ebase User
- Posts: 97
- Joined: Thu Sep 13, 2007 6:07 am
- Location: The Netherlands
Re: Problems using newer JDBC drivers with MySQL
Perhaps those functions are not supported by later versions of MySQL. We have faced similar problems with MS SQL Server 2000 and 2005 because of this.llyr wrote:Hope someone can help!
...
we are using any functions in queries such as TIME_FORMAT or DATE_FORMAT
...
0 x
What's the meaning of Justice...
-
- Ebase User
- Posts: 7
- Joined: Fri Dec 17, 2010 2:34 pm
Re: Problems using newer JDBC drivers with MySQL
But these functions work fine with both MySQL 5.0.33 and 5.1.48 using the current JDBC version in live which is 3.0.15. It's only when we've upgraded to JDBC version 5.1.10 that these functions then stop working in MYSQL 5.0.33.Vircos wrote:Perhaps those functions are not supported by later versions of MySQL. We have faced similar problems with MS SQL Server 2000 and 2005 because of this.
Anyone with any ideas please?
0 x
-
- Ebase User
- Posts: 97
- Joined: Thu Sep 13, 2007 6:07 am
- Location: The Netherlands
I think I do understand your problem now.
Within your form you use a table with a field named "TBLREPORTS2-DESCRIPTION". I assume that this field is a date field, correct?
If I do understand the documentation of MySQL correctly the TIME_FORMAT and DATE_FORMAT functions both returns a string.
So, if my assumption is right, you are trying to put a string into a date field and that will generate the error mentioned by you.
If you change the field "TBLREPORTS2-DESCRIPTION" from Date to Character your problem should be solved.
Within your form you use a table with a field named "TBLREPORTS2-DESCRIPTION". I assume that this field is a date field, correct?
If I do understand the documentation of MySQL correctly the TIME_FORMAT and DATE_FORMAT functions both returns a string.
So, if my assumption is right, you are trying to put a string into a date field and that will generate the error mentioned by you.
If you change the field "TBLREPORTS2-DESCRIPTION" from Date to Character your problem should be solved.
0 x
What's the meaning of Justice...
-
- Ebase User
- Posts: 7
- Joined: Fri Dec 17, 2010 2:34 pm
No, TBLREPORTS2-DESCRIPTION is a Char.Vircos wrote:I think I do understand your problem now.
Within your form you use a table with a field named "TBLREPORTS2-DESCRIPTION". I assume that this field is a date field, correct?
If I do understand the documentation of MySQL correctly the TIME_FORMAT and DATE_FORMAT functions both returns a string.
So, if my assumption is right, you are trying to put a string into a date field and that will generate the error mentioned by you.
If you change the field "TBLREPORTS2-DESCRIPTION" from Date to Character your problem should be solved.
These forms have been working fine in live using JDBC version 3.0.15. It's since we've upgraded the JDBC drivers to 5.1.10 we've had these errors
0 x
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
-
- Ebase User
- Posts: 7
- Joined: Fri Dec 17, 2010 2:34 pm
-
- Ebase User
- Posts: 53
- Joined: Thu Sep 13, 2007 9:02 am
- Contact:
There appears to have been some changes introduced in Mysql 5.1 which may affect the DATE_FORMAT function and may produce different results to the 5.0 version.
These are documented at http://dev.mysql.com/doc/refman/5.1/en/ ... pport.html
Have you tried the 5.0.x version of the JDBC driver which is available from here ?
http://dev.mysql.com/downloads/connecto ... #downloads
This might resolve your problem for the 5.0.x issues but introduce problems in 5.1.
It's a while since I used Mysql in earnest but I would guess that there is some configuration discrepancy between the 5.0.x and 5.1.x in the storage and formatting of dates.
These are documented at http://dev.mysql.com/doc/refman/5.1/en/ ... pport.html
Have you tried the 5.0.x version of the JDBC driver which is available from here ?
http://dev.mysql.com/downloads/connecto ... #downloads
This might resolve your problem for the 5.0.x issues but introduce problems in 5.1.
It's a while since I used Mysql in earnest but I would guess that there is some configuration discrepancy between the 5.0.x and 5.1.x in the storage and formatting of dates.
0 x
Who is online
Users browsing this forum: No registered users and 47 guests