Search found 78 matches

by degas
Wed 07 Aug 2013 12:38
Forum: dotConnect for Oracle
Topic: Many to Many wrong table name
Replies: 2
Views: 4780

Re: Many to Many wrong table name

So sorry i wasted your time.
by degas
Thu 01 Aug 2013 21:00
Forum: dotConnect for Oracle
Topic: Many to Many wrong table name
Replies: 2
Views: 4780

Many to Many wrong table name

I have a class called EntidadLegal. Then to more classes that extend EntidadLegal called Cargador and Cliente. The Cargador has a many to many relationshiop to Cargador. I have mapped the relationship as following:

Code: Select all

modelBuilder.Entity<Cliente>()
                .HasMany(u => u.Cargadores)
                .WithMany(c => c.Clientes).Map(f => f.MapLeftKey("ID_CLIENTE").MapRightKey("ID_CARGADOR").ToTable("DEGNET.CLIENTE_CARGADOR"));
The problem is that when i try to access this properties form Cliente (or Cargador) the sql generated is wrong because the table name is between "" like this

Code: Select all

SELECT 
'1X0X' AS C1,
"Join1".ID_ENTIDAD_LEGAL,
"Join1".NEMONICO,
"Join1".RAZON_SOCIAL,
"Join1".CUIT,
"Join1".FAX1 AS FAX,
"Join1".TELEFONO1 AS TELEFONO,
"Join1".MEGID,
"Join1".NOMBRE_PARA_TGN,
"Join1".RECIBE_FAX,
"Join1".FAX2 AS FAX1,
"Join1".TELEFONO2 AS TELEFONO1,
"Join1".EMAIL,
"Join1".RESPONSABLE,
"Join1".ID_CARGADOR_TGN
FROM  "DEGNET.CLIENTE_CARGADOR" "Extent1"  <----ERROR should be "DEGNET"."CLIENTE_CARGADOR"
INNER JOIN  (SELECT 
    "Extent2".ID_ENTIDAD_LEGAL,
    "Extent2".NEMONICO,
    "Extent2".RAZON_SOCIAL,
    "Extent2".CUIT,
    "Extent2".FAX AS FAX1,
    "Extent2".TELEFONO AS TELEFONO1,
    "Extent2".MEGID,
    "Extent3".ID_CARGADOR,
    "Extent3".NOMBRE_PARA_TGN,
    "Extent3".RECIBE_FAX,
    "Extent3".FAX AS FAX2,
    "Extent3".TELEFONO AS TELEFONO2,
    "Extent3".EMAIL,
    "Extent3".RESPONSABLE,
    "Extent3".ID_CARGADOR_TGN
    FROM  RED.ENTIDAD_LEGAL "Extent2"
    INNER JOIN RED.CARGADOR "Extent3" ON "Extent2".ID_ENTIDAD_LEGAL = "Extent3".ID_CARGADOR ) "Join1" ON "Extent1".ID_CARGADOR = "Join1".ID_ENTIDAD_LEGAL
WHERE "Extent1".ID_CLIENTE = :EntityKeyValue1

in order to fix this temporaly i have change the mapping to

Code: Select all

modelBuilder.Entity<Cliente>()
                .HasMany(u => u.Cargadores)
                .WithMany(c => c.Clientes).Map(f => f.MapLeftKey("ID_CLIENTE").MapRightKey("ID_CARGADOR").ToTable("DEGNET\".\"CLIENTE_CARGADOR"));
This workaround seems to work for the relationship, also when inserting in the table
by degas
Thu 04 Jul 2013 20:53
Forum: Entity Framework support
Topic: Same class name Entity
Replies: 1
Views: 2102

Same class name Entity

Look at this issue i have created in Codeplex.
Is this a limitation of your driver for oracle https://entityframework.codeplex.com/workitem/1358
I am using version 7.4.146.0
by degas
Thu 23 May 2013 21:47
Forum: Entity Developer
Topic: EF Code First Oracle Map Char(1) to Bool
Replies: 3
Views: 6469

EF Code First Oracle Map Char(1) to Bool

I am using EF Code First with Oracle and i want to map Char(1) to bool. The values are 'S' for true and 'N' for false
by degas
Fri 27 Jan 2012 13:30
Forum: dotConnect for Oracle
Topic: Performance + MultiThread + TypedDataSets
Replies: 2
Views: 962

I was not able to reproduce this problem on other server, so i am dismissing it. I apologize for any incovinience.
by degas
Wed 18 Jan 2012 21:16
Forum: dotConnect for Oracle
Topic: Performance + MultiThread + TypedDataSets
Replies: 2
Views: 962

Performance + MultiThread + TypedDataSets

I have a windows service running multiple threads, each one is updating the database inside a transaction. To update the table i am using a TypedDataSet.

If i only define 1 thread, each task get done one after another and everyuthing works quiete fine. But when setting multiple threads things get really slow.
Even more, when tested isolated from the rest (using nunit), the performance is more than acceptable.

In the case with only 1 thread, each insert/update command takes about 0.0015s to 0s. With multiple threads it goes from 0.35 to 5 to 7 seconds.
When tested alone takes between 0.0015 to 0s. This values are obtained using the dbMonitor (i can send you the log if you need them.)

It is important to say that there is no error, it simple takes to much time. Anothe thing is that in the same transaction i call package's procedures (using also devart) and they always takes the same ammount of time and they are really fast.

To update the datatable i am using the method LoadDataRow to make changes to the datatable and then call the Update. Also i am setting
DataTable.MissingSchemaAction = System.Data.MissingSchemaAction.Add;

I am using version 5.30.79.
by degas
Mon 02 Jan 2012 20:02
Forum: dotConnect for Oracle
Topic: -4.6 returns as -4.6000000000000005
Replies: 4
Views: 1601

I am having the same problem

Hi, i am having the same problem (same DevArt version) but not with LINQ, but with TypedDataSet. The problem is that the dataset update command does not work, because when it compares original values in the where clause, the values don't match so the update returns 0 rows updated. This ends up in an error being thrown.

I am using the DbMonitor and everything looks fine but when i debug it, i see the real values and they look like this:

1.021 ---> 1.0210000000000001


Is there a way to solve this.
by degas
Mon 19 Dec 2011 20:18
Forum: dotConnect for Oracle
Topic: ORA-01483: invalid length for DATE
Replies: 2
Views: 3800

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
by degas
Mon 19 Dec 2011 18:53
Forum: dotConnect for Oracle
Topic: ORA-01483: invalid length for DATE
Replies: 2
Views: 3800

Another data. If you put it on a loop, the first time work, the second timne fails, the third time works and so on.
by degas
Mon 19 Dec 2011 18:29
Forum: dotConnect for Oracle
Topic: ORA-01483: invalid length for DATE
Replies: 2
Views: 3800

ORA-01483: invalid length for DATE

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
by degas
Wed 07 Dec 2011 14:29
Forum: dotConnect for Oracle
Topic: Oracle DataTable and PrimaryKey
Replies: 11
Views: 1652

any news?
by degas
Wed 07 Dec 2011 14:29
Forum: dotConnect for Oracle
Topic: Oracle DataTable and PrimaryKey
Replies: 11
Views: 1652

any news?
by degas
Mon 05 Dec 2011 12:35
Forum: dotConnect for Oracle
Topic: A connection attempt failed because the connected party did
Replies: 2
Views: 3199

Setting the commandTimeOut=0 worked fine.
Thanks a lot
by degas
Tue 29 Nov 2011 15:01
Forum: dotConnect for Oracle
Topic: A connection attempt failed because the connected party did
Replies: 2
Views: 3199

A connection attempt failed because the connected party did

Message : Network error:: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Stack Trace : at Devart.Data.Oracle.bt.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.Oracle.bt.a(Byte& A_0)
at xc.l.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at xc.l.b()
at Devart.Data.Oracle.bj.c()
at Devart.Data.Oracle.s.a(Int32 A_0, a4 A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at Devart.Common.DbScript.ExecuteSqlStatement(SqlStatement sqlStatement)
at Devart.Data.Oracle.OracleScript.ExecuteSqlStatement(SqlStatement stmt)
at Devart.Common.DbScript.b(SqlStatement A_0)
at Devart.Common.SqlStatement.Execute()
at Devart.Common.DbScript.ExecuteNext(IDataReader& reader)
at Devart.Common.DbScript.Execute()
at SziCom.SvnDB.OracleDatabase.ApplyGrantsBetweenUsers()
at SziCom.SvnDB.Command.SvnDBMigrateCommand.MigrateDatabaseIncrementally(Int64 RevisionFrom, Int64 RevisionTo)
at SziCom.SvnDB.Command.SvnDBMigrateCommand.Execute(Arguments ConsoleArguments)
at SziCom.SvnDB.Command.SvnDB.TriggerCommand(Arguments args)
at SziCom.SvnDB.Program.Main(String[] Arguments)

I am getting the following error, but the weird thing is that it happens on some machines only (always the sameones)

Here is the connection string
by degas
Wed 16 Nov 2011 20:32
Forum: dotConnect for Oracle
Topic: Oracle DataTable and PrimaryKey
Replies: 11
Views: 1652

I have downloaded the new trial version and there is still no fix to this problem? The fact that the PK is not defined as such, make the method LoadDataRow useless.