ORA-01483: invalid length for DATE

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
degas
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

ORA-01483: invalid length for DATE

Post by degas » Mon 19 Dec 2011 18:29

I am using a typed datatable for the following table.

CREATE TABLE TGN.LOG_DEGABI
(
ID_LOG NUMBER(6),
FECHA_HORA DATE DEFAULT SYSDATE CONSTRAINT NN_LOG_DEGABI_FECHA_HORA NOT NULL,
USUARIO VARCHAR2(30 BYTE) DEFAULT USER CONSTRAINT NN_LOG_DEGABI_USUARIO NOT NULL,
PROCESO VARCHAR2(80 BYTE),
RESULTADO CHAR(1 BYTE) DEFAULT 'N',
ARCHIVO BLOB,
ID_TIPO_MEDICION NUMBER(1)
)

This is what i see in the dbMonitor:

INSERT INTO TGN.LOG_DEGABI (ID_LOG, FECHA_HORA, USUARIO, PROCESO, RESULTADO, ARCHIVO, ID_TIPO_MEDICION) VALUES (:ID_LOG, :FECHA_HORA, :USUARIO, :PROCESO, :RESULTADO, :ARCHIVO, :ID_TIPO_MEDICION) RETURNING ID_LOG, FECHA_HORA, USUARIO, PROCESO, RESULTADO, ARCHIVO, ID_TIPO_MEDICION INTO :ID_LOG, :FECHA_HORA, :USUARIO, :PROCESO, :RESULTADO, :ARCHIVO, :ID_TIPO_MEDICION

All parameters have values according to the monitor and the prepare stament completes correctly

Here is the error log:

Type : Devart.Data.Oracle.OracleException, Devart.Data.Oracle, Version=5.35.79.0, Culture=neutral, PublicKeyToken=09af7300eec23701
Message : ORA-01483: invalid length for DATE or NUMBER bind variable
Source : System.Data
Help link :
Code : 1483
Offset : 16
Errors :
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 UpdatedRowStatusErrors(System.Data.Common.RowUpdatedEventArgs, BatchCommandInfo[], Int32)
Stack Trace : en System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
en System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
en System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
en System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
en System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
en Devart.Common.DbDataTable.Update()
en Devart.Data.Oracle.OracleDataTable.Update()
en SziCom.Degas.Data.BaseService.UpdateDataTable(OracleDataTable dataTable) en C:\NDegas\ncore\src\szicom.degas.data\BaseService.cs:línea 84
en SziCom.Degas.Data.TGN.TGNService.UpdateLogDegAbi(Log_DegabiDataTable logDegAbi) en C:\NDegas\ncore\src\szicom.degas.data\TGN\TGNService.cs:línea 146
en SziCom.Degas.Data.TGN.TGNService.AddLogDegAbi(String Proceso, Boolean resultado, String archivo, Nullable`1 tipoMedicion) en C:\NDegas\ncore\src\szicom.degas.data\TGN\TGNService.cs:línea 164
en SziCom.Degas.Core.Abi.AutorizacionTransporteDegasAbi.ProcesoAbi(String Archivo) en C:\NDegas\ncore\src\szicom.degas.core\Abi\AutorizacionTransporteDegasAbi.cs:línea 46
en SziCom.Degas.Jobs.Abi.BaseDescargaAbiJob.b__0() en C:\NDegas\ncore\src\SziCom.Degas.Jobs\Abi\BaseDescargaAbiJob.cs:línea 65
en Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionManagerImpl.Process(Action action, String policyName) en e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionManagerImpl.cs:línea 185

Additional Info:

MachineName : PC-PABLO
TimeStamp : 19/12/2011 06:08:01 p.m.
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : SziCom.Degas.Quartz.exe
ThreadIdentity :
WindowsIdentity : PC-PABLO\Administrador


The funny thing is that the first time it excecutes correctly but the second time fails.

I am using DevArt 5.35.79

degas
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Post by degas » Mon 19 Dec 2011 18:53

Another data. If you put it on a loop, the first time work, the second timne fails, the third time works and so on.

degas
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Post by degas » Mon 19 Dec 2011 20:18

The problem is with the returning clause. I have delete all the returning parameters except fot the primary_key (ID_LOG) wich i need because it is generated with a trigger

Post Reply