Hello, we use database (sqlserver) to store values. One of those field is an ivy DateTime. When we try to store it in the database we have this error : com.microsoft.sqlserver.jdbc.SQLServerException: The conversion of a varchar data type to a smalldatetime data type resulted in an out-of-range value. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) The ivy field is a ch.ivyteam.ivy.scripting.objects.DateTime and it must be stored in a smalldatetime filed from sqlserver (10.50.4000.0). What are we doing wrong ? asked 23.03.2015 at 17:45 dbalasse |
Hi there Possibilities I could think of:
answered 25.03.2015 at 16:34 Peter Stöckli ♦ Hi, i've solved this by changing the DateTime to a java.sql.Date. Then I format this date in a string with the right format ("yyyy-MM-dd hh:mm:ss"). It worked well on my dev environment but on the client's TST env, the format was different, days and month were inverted ("yyyy-dd-MM hh:mm:ss") In the futur, what would be an "ivy" standard way to store Date ? Thanks for your answer.
(25.03.2015 at 16:45)
dbalasse
Hi what is the language of the MSSQL DB User in use?
(26.03.2015 at 10:24)
Peter Stöckli ♦
Have you tried using the jTDS driver for MSSQL? (You can switch the driver in use in the Databases configuration UI)
(30.03.2015 at 16:43)
Peter Stöckli ♦
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 23.03.2015 at 17:45
Seen: 1,794 times
Last updated: 30.03.2015 at 16:43