Search found 22 matches

by peledkfir
Thu 16 Feb 2012 21:48
Forum: dotConnect for Oracle
Topic: NRE when executing stored procedure with array type param
Replies: 6
Views: 1339

It works, 10x
by peledkfir
Wed 08 Feb 2012 15:55
Forum: dotConnect for Oracle
Topic: NRE when executing stored procedure with array type param
Replies: 6
Views: 1339

Hi,
I have problem with the fix when sending empty arrays
Now, I get ORA-06531: Reference to uninitialized collection

I iterate over the array in the stored procedure as follows

FORALL i IN p_array.FIRST. . p_array.LAST
INSERT INTO TMP VALUES(p_array(i));

This problem never occured to me before with dotconnect
Plz help
I'm using version 6.70
Thanks, kfir
by peledkfir
Mon 26 Dec 2011 17:57
Forum: dotConnect for Oracle
Topic: NRE when executing stored procedure with array type param
Replies: 6
Views: 1339

NRE when executing stored procedure with array type param

When I execute storedprocedure, NRE is thrown from the provider after upgrading from version 6.50.228
The following code reproduces the exception:

DDL:

PROCEDURE WITH_ARRAY_PARAM ( p_array guid_array_t)
IS
BEGIN
null;
END;

TYPE guid_array_t is table of raw(16)

configuration connection string:


code:

Code: Select all

 var conn = DbProviderFactories.GetFactory(ConfigurationManager.ConnectionStrings["conn"].ProviderName).CreateConnection();
            conn.ConnectionString = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
            using (conn)
            {
                conn.Open();
                using (IDbCommand command = conn.CreateCommand())
                {
                    command.CommandText = "WITH_ARRAY_PARAM";
                    command.CommandType = CommandType.StoredProcedure;
                    var param = DbProviderFactories.GetFactory(ConfigurationManager.ConnectionStrings["conn"].ProviderName).CreateParameter();
                    param.ParameterName = "p_array";
                    IList paramVal = new OracleArray(OracleType.GetObjectType("guid_array_t", (OracleConnection)conn));
                    param.Value = paramVal;
                    command.Parameters.Add(param);
                    command.ExecuteNonQuery(); // NRE
                }
            }
Regards,
Kfir
by peledkfir
Fri 02 Sep 2011 14:01
Forum: dotConnect for Oracle
Topic: Batch updates in EF
Replies: 5
Views: 1129

2. Because I need distributed transactions
by peledkfir
Thu 01 Sep 2011 16:38
Forum: dotConnect for Oracle
Topic: Batch updates in EF
Replies: 5
Views: 1129

1. In multi-threaded application it seems that your solution for enabling batch will effect all thread in the application - which is not good enough for my case..
2. I already read that post. My question was if there an other way to work with transacation that is not TransactionScope with batches like beginTransaction

10x for your response
by peledkfir
Tue 30 Aug 2011 09:25
Forum: dotConnect for Oracle
Topic: SELECT with inheritance in model
Replies: 1
Views: 838

SELECT with inheritance in model

In my model I have some entities mapped by table per subclass.
The sql generates when selecting the Set is some kind of

select * from tbl1
union all
(select * from tbl2
union all
(select * from tbl 3....

And so on.. it is a performance killer
My question is if you can consider to improve it to
select * from tbl1
union all
select * from tbl2
union all
select * from tbl3 .. and so on..

My current workaround is to select from the set using OfType but it brakes the code generic


I'm using dot connect 6.10.141 with oracle 11.2g
by peledkfir
Tue 30 Aug 2011 09:12
Forum: dotConnect for Oracle
Topic: NullReferenceException in Dispose of transaction scope
Replies: 1
Views: 947

NullReferenceException in Dispose of transaction scope

Hi,
I'm using dotConnect 6.10.141
I call in ambient transaction to a SP that deffer constrained until commit.
Using: EXECUTE IMMEDIATE 'SET CONSTRAINT ALL deferred';
If trying to commit when the SP brakes one of the FK's you will get a NullReferenceException instead of any other indicative exception of the error.
by peledkfir
Tue 30 Aug 2011 09:00
Forum: dotConnect for Oracle
Topic: Batch updates in EF
Replies: 5
Views: 1129

Batch updates in EF

Hi,
I wish to know if there is a possibility to config only a specific context to use batch updates instead of configure it globally?
Another question, is there any way to use transactions with batch updates?

Thanks, Kfir
by peledkfir
Tue 26 Apr 2011 18:14
Forum: dotConnect for Oracle
Topic: DB monitor and Raw
Replies: 5
Views: 1427

I'm using dbMonitor version 3.0.3. dotConnect 6.10.96 and Visual Studio 2010 SP1.

I'm using EF.

Maybe it's because the queries are done through EF and not directly ADO.NET?
by peledkfir
Sun 24 Apr 2011 12:42
Forum: dotConnect for Oracle
Topic: DB monitor and Raw
Replies: 5
Views: 1427

DB monitor and Raw

Hey,
In some tables I work with Raw16 for representing Guid.
When working with db monitor, looking at executed sql statement parameters, instead of showing the value of the Guid or the values in the byte array it just shows "System.Byte[]".

It will be helpful if it will be fixed.
Thanks,
Kfir.
by peledkfir
Wed 13 Apr 2011 16:01
Forum: dotConnect for Oracle
Topic: InvalidCastException when working with OracleQueue
Replies: 4
Views: 1140

10x,
Kfir
by peledkfir
Mon 04 Apr 2011 15:18
Forum: dotConnect for Oracle
Topic: InvalidCastException when working with OracleQueue
Replies: 4
Views: 1140

InvalidCastException when working with OracleQueue

When using OracleQueue Listen method with single consumer.
(QueueAgent.Name is null; QueueAgent.Address is queue name).
I get InvalidCastException DBNull to System.String.
dotConnect version: 6.10.111

kfir.
by peledkfir
Mon 07 Feb 2011 23:10
Forum: dotConnect for Oracle
Topic: TransactionScope + Pooling
Replies: 15
Views: 4942

SWEET!
by peledkfir
Wed 02 Feb 2011 21:25
Forum: dotConnect for Oracle
Topic: Request hang - OCIFREEHANDLE
Replies: 4
Views: 3035

After applying the workaround I mentioned in other post:
http://www.devart.com/forums/viewtopic.php?t=20005
It seems the problem does not reproduces any more.
by peledkfir
Sun 30 Jan 2011 11:24
Forum: dotConnect for Oracle
Topic: TransactionScope + Pooling
Replies: 15
Views: 4942

I found an other problem when working with transactions.
When trying to open a new connection with transaction suppress option I get an exception.
When trying the same with sql server. It works fine.

Code: Select all

        public void Hoo() 
        { 
            using (TransactionScope scope = new TransactionScope()) 
            {
               using (var model = new OHEntities2()) 
               using (TransactionScope scope1 = new TransactionScope()) 
               { 
                   model.Connection.Open(); 
                   model.OH_TABLE3.FirstOrDefault();
                   model.Connection.Close(); 
               } 

               using (TransactionScope scope2 = new TransactionScope(TransactionScopeOption.Suppress)) 
               { 
                   model.Connection.Open(); 
                   model.OH_TABLE3.FirstOrDefault();
                   model.Connection.Close(); 
               }

	       scope.Complete();
            }
        }