|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
Bonjour tout le monde,
Je me fais des noeuds au cerveau avec cette erreur: Envt: - Adaptive Server Enterprise/12.5.4/EBF 14347 ESD#5/P/Linux Intel/Enterprise Linux/ase1254/2061/32-bit/OPT/Thu Apr 12 21:13:17 2007 - sqsh-2.1 J'ai une table: CREATE TABLE TKMMONTHLYREPORT ( POLICYNUMBER varchar(20) NOT NULL, DATEOFDEATH date NULL, SURRENDERDATE date NULL, NOTIFICATIONDATE date NULL, NEWGUARANTEEDVALUE decimal(20,10) NULL, NEWGUARANTEEDVALUEDATE date NULL, DATEINSERT date NOT NULL ) go et voici mes commandes, sous sqsh: [504] cerise.referencedb.1> insert TKMMONTHLYREPORT values ("1200009348", NULL, NULL, NULL, 7000000, '2007-10-19', '2007-11-07'); (1 row affected) [505] cerise.referencedb.1> select * from TKMMONTHLYREPORT where POLICYNUMBER = '1200009348'; Msg 247, Level 16, State 2 Server 'cerise', Line 1 Arithmetic overflow during implicit conversion of DATE value 'Jun 17 +(/'' to a DATETIME field . Arithmetic overflow occurred. Voila, si je passe sous isql pour lire la meme ligne, tout va bien: 1> select * from TKMMONTHLYREPORT where POLICYNUMBER = '1200009348' 2> go POLICYNUMBER DATEOFDEATH SURRENDERDATE NOTIFICATIONDATE NEWGUARANTEEDVALUE NEWGUARANTEEDVALUEDATE DATEINSERT -------------------- ------------ ------------- ---------------- ----------------------- ---------------------- ------------ 1200009348 NULL NULL NULL 7000000.0000000000 Oct 19 2007 Nov 7 2007 Bug Sybase, Bug sqsh/TDS, ...PEBKAC Si qqu'un a des Idees je suis preneur... |
|
|
00
|
|
|
#2 |
![]() ![]() |
Il y a peut-être un problème avec sqsh 2.1 et les champs de type DATE.
Si c'est possible, essaye sqsh 2.1.4 pour voir si cela résout le problème. Michael
__________________
Michael Peppler Membre de TeamSybase - www.teamsybase.com "A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson |
|
|
00
|
|
|
#3 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
Bonjour Michael,
Ok je vais essayer la v2.1.4. En attendant, j'ai continue un peu a jouer avec ca et je me suis apercu de 2 choses: 1) si je change la valeur du decimal(20,10) NEWGUARANTEEDVALUE, ca passe en sqsh !: [507] cerise.ecerisier.1> delete from TOKYOMARINEMONTHLYREPORT where POLICYNUMBER = '1200009348'; (1 row affected) [508] cerise.ecerisier.1> insert TOKYOMARINEMONTHLYREPORT values ("1200009348", NULL, NULL, NULL, 1000, '2007-10-19', '2007-11-07'); (1 row affected) [509] cerise.ecerisier.1> select * from TOKYOMARINEMONTHLYREPORT where POLICYNUMBER = '1200009348'; POLICYNUMBER DATEOFDEATH SURRENDERDATE NOTIFICATIONDATE NEWGUARANTEEDVALUE NEWGUARANTEEDVALUEDATE DATEINSERT -------------------- ------------------- ------------------- ------------------- ----------------------- ---------------------- ------------------- 1200009348 NULL NULL NULL 1000.0000000000 Oct 19 2007 12:00AM Nov 7 2007 12:00AM (1 row affected) 2) Ca me semble lie a TDS, car si j'essaie de lire la ligne en question en java avec un jdbc Jconnect 5.5, je me chope la meme exception: [...] at com.nexgenfs.util.CommandCaller.invoke(CommandCaller.java:109) at com.nexgenfs.util.TextCommandCaller$Command.invoke(TextCommandCaller.java:55) at com.nexgenfs.util.CommandsCaller.invoke(CommandsCaller.java:72) at com.nexgenfs.util.TextCommandCaller.runOrCrash(TextCommandCaller.java:95) at com.nexgenfs.util.TextCommands.runOrCrash(TextCommands.java:90) at com.nexgenfs.textui.Interpreter.runOrCrash(Interpreter.java:607) at com.nexgenfs.textui.JInterpreter.runSwing(JInterpreter.java:986) at com.nexgenfs.textui.JInterpreter.access$2800(JInterpreter.java:47) at com.nexgenfs.textui.JInterpreter$ExecThread.run(JInterpreter.java:856) Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Arithmetic overflow during implicit conversion of DATE value 'Jun 17 +(/'' to a DATETIME field . at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2884) at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2206) at com.sybase.jdbc2.tds.TdsResultSet.nextResult(TdsResultSet.java:585) at com.sybase.jdbc2.tds.TdsResultSet.next(TdsResultSet.java:323) at com.sybase.jdbc2.jdbc.SybResultSet.next(SybResultSet.java:148) at com.nexgenfs.data.sqldatabase.PResultSet.next(PResultSet.java:64) ... 23 more Alors ca voudrait dire qu'il faut que je passe en jconnect 6.x ? |
|
|
00
|
|
|
#4 |
![]() ![]() |
Intéressant...
Avec sqsh, essaye peut-être la requête avec \qo -m meta pour voir quels types de data sqsh pense recevoir. A priori je pense qu'il y a une confusion entre ce que ASE envoie sur la ligne, et le datatype qui est utilisé dans le bind (appel à ct_bind() dans le code sqsh). Michael
__________________
Michael Peppler Membre de TeamSybase - www.teamsybase.com "A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson |
|
|
00
|
|
|
#5 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
ok, mais ca me donne pas grand-chose comme output:
[518] cerise.ecerisier.1> select * from TOKYOMARINEMONTHLYREPORT where POLICYNUMBER = '1200009348' [518] cerise.ecerisier.2> \go -m meta Msg 247, Level 16, State 2 Server 'cerise', Line 1 Arithmetic overflow during implicit conversion of DATE value 'Jun 17 +(/'' to a DATETIME field . Arithmetic overflow occurred. CS_CMD_FAIL CS_CMD_NUMBER = 1 CS_ROW_COUNT = -1 CS_TRANS_STATE = CS_TRAN_FAIL Si je le fais avec une autre valeur pour le decimal, ca passe et ca donne ca: [513] cerise.ecerisier.2> \go -m meta CS_ROW_RESULT CS_BROWSE_INFO = CS_FALSE CS_CMD_NUMBER = 1 CS_NUMDATA = 7 CS_NUMORDERCOLS = 0 COLUMN #1 name = POLICYNUMBER namelen = 12 datatype = CS_CHAR_TYPE format = CS_FMT_UNUSED maxlength = 20 scale = 0 precision = 0 status = CS_UPDATABLE count = 0 usertype = 2 locale = 0x0x86c1558 COLUMN #2 name = DATEOFDEATH namelen = 11 datatype = CS_DATETIME_TYPE format = CS_FMT_UNUSED maxlength = 8 scale = 0 precision = 0 status = CS_UPDATABLE,CS_CANBENULL count = 0 usertype = 37 locale = 0x0x86c1558 COLUMN #3 name = SURRENDERDATE namelen = 13 datatype = CS_DATETIME_TYPE format = CS_FMT_UNUSED maxlength = 8 scale = 0 precision = 0 status = CS_UPDATABLE,CS_CANBENULL count = 0 usertype = 37 locale = 0x0x86c1558 COLUMN #4 name = NOTIFICATIONDATE namelen = 16 datatype = CS_DATETIME_TYPE format = CS_FMT_UNUSED maxlength = 8 scale = 0 precision = 0 status = CS_UPDATABLE,CS_CANBENULL count = 0 usertype = 37 locale = 0x0x86c1558 COLUMN #5 name = NEWGUARANTEEDVALUE namelen = 18 datatype = CS_DECIMAL_TYPE format = CS_FMT_UNUSED maxlength = 35 scale = 10 precision = 20 status = CS_UPDATABLE,CS_CANBENULL count = 0 usertype = 26 locale = 0x0x86c1558 COLUMN #6 name = NEWGUARANTEEDVALUEDATE namelen = 22 datatype = CS_DATETIME_TYPE format = CS_FMT_UNUSED maxlength = 8 scale = 0 precision = 0 status = CS_UPDATABLE,CS_CANBENULL count = 0 usertype = 37 locale = 0x0x86c1558 COLUMN #7 name = DATEINSERT namelen = 10 datatype = CS_DATETIME_TYPE format = CS_FMT_UNUSED maxlength = 8 scale = 0 precision = 0 status = CS_UPDATABLE count = 0 usertype = 37 locale = 0x0x86c1558 CS_TRANS_STATE = CS_TRAN_COMPLETED CS_CMD_DONE CS_CMD_NUMBER = 1 CS_ROW_COUNT = 1 CS_TRANS_STATE = CS_TRAN_COMPLETED |
|
|
00
|
|
|
#6 |
![]() ![]() |
En regardant le code de 2.1.4 je vois que j'ai clairement mis des cas pour CS_DATE_TYPE - il est probable que le fait d'envoyer le bind sur un appel générique pose problème (p.ex. buffer trop petit).
Ceci étant c'est bizarre que jConnect 5.x ait le même comportement, puisque on ne devrait pas pouvoir faire de "buffer overrun" en java... Michael
__________________
Michael Peppler Membre de TeamSybase - www.teamsybase.com "A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson |
|
|
00
|
|
|
#7 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
Michael,
Merci pour ca, deja. - Avec sqsh 2.1.4 ca passe tres bien: [...] COLUMN #7 name = DATEINSERT namelen = 10 datatype = CS_DATE_TYPE format = CS_FMT_UNUSED maxlength = 4 scale = 0 precision = 0 status = CS_UPDATABLE count = 0 usertype = 37 locale = 0x0x87ef508 CS_TRANS_STATE = CS_TRAN_COMPLETED CS_CMD_DONE CS_CMD_NUMBER = 1 CS_ROW_COUNT = 1 CS_TRANS_STATE = CS_TRAN_COMPLETED Il appelle bien un type DATE. D'ailleurs, si j'altere tous les champs de ma table en datetime, ca passe aussi, meme en sqsh 2.1. Le seul truc qui me chiffonne encore c'est que ca plante par java...J'ai pourtant essaye d'utiliser le dernier jconn2.jar livre avec la 12.5.4. Il devrait connaitre les types date celui-la !! (Je crois que c'est sorti a la 12.5.2...) |
|
|
00
|
|
|
#8 |
![]() ![]() |
Mon java est assez limité...
A ta place j'ouvrirais un call chez Sybase (si c'est possible), surtout comme le problème a aussi l'air d'être lié aux données spécifiques qui sont entrées pour cette ligne. Michael
__________________
Michael Peppler Membre de TeamSybase - www.teamsybase.com "A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson |
|
|
00
|
|
|
#9 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
ok je vais faire ca je pense.
Je viens de tester avec un jconnect 6.5 et ca passe... Merci pour ton aide. a+ Emmanuel |
|
|
00
|
|
|
#10 |
|
Invité de passage
![]() Inscription : mars 2007 Messages : 8 ![]() |
Finalement je ne pense pas ouvrir de ticket chez sybase...
![]() Tire des doc sybbooks sur la derniere release jconnect 5.5 : Release Bulletin for jConnect™ for JDBC™ Version 5.5 Support for date and time datatypes jConnect for JDBC versions 5.5 and later support the date and time datatypes with Adaptive Server Enterprise versions 12.5.1 and later. To use these datatypes, a jConnect for JDBC client must set the driver version to 6. To do so, the client can use the SybDriver.setVersion() method, or use the JCONNECT_VERSION connection property. For more information, see Chapter 2, “Programming Information,” in the jConnect for JDBC Programmer’s Reference. Copyright © 2004. Sybase Inc. All rights reserved. Desole pour le temps perdu..et merci. |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com