NET: Unknown Error 1 when updating.

NET: Unknown Error 1 when updating.

Postby Partizan » Mon 02 Feb 2015 15:57

Hi Devart!

We found out that on some cases we get NET: Unknown Error 1.

Please take a look at this sample:

DDL:
Code: Select all
CREATE TABLE TEST
(
  ID                   NUMBER(19)               NOT NULL, 
  NAME                 VARCHAR2(1000 CHAR)      NOT NULL,
  LAST_UPDATED_DT      DATE                     NOT NULL 
);


CREATE UNIQUE INDEX AK_TEST_NAME ON TEST
(NAME);

CREATE OR REPLACE TRIGGER BIU_TEST_DT
    BEFORE INSERT OR UPDATE
    ON TEST     REFERENCING NEW AS New OLD AS Old
    for each row
begin
      :new.last_updated_dt := sys_extract_utc(SYSTIMESTAMP);
end;

INSERT INTO TEST(ID,NAME)
VALUES(1,'TEST DATA');

INSERT INTO TEST(ID,NAME)
VALUES(2,'TEST DATA2');

COMMIT;


C#:

Code: Select all
      private static void Main(string[] args)
      {         
            string connectionString = "User Id=<...>;Password=<...>;Direct=true;Data Source=<...>;Port=1521;SID=<...>;Pooling=true;Unicode=true";
            using (var transaction = new TransactionScope(TransactionScopeOption.Required,
               new TransactionOptions {IsolationLevel = IsolationLevel.ReadCommitted}))
            {
               using (OracleConnection connection = new OracleConnection(connectionString))
               {
                  connection.Open();
                  using (var command = connection.CreateCommand())
                  {
                     var array = new decimal?[1];
                     array.SetValue((decimal?) 2, 0);
                     var arrayGenericName = new String[1];
                     arrayGenericName.SetValue("TEST DATA", 0);
                     var arrayLastUpdatedDate = new DateTime[1];
                     command.CommandText = "update  TEST set name = :name where id = :id RETURNING  LAST_UPDATED_DT INTO  :LastUpdatedDt";
                     command.PassParametersByName = true;
                     var idParam = new OracleParameter("id", OracleDbType.Number)
                     {
                        Value = array,
                        Direction = ParameterDirection.Input
                     };
                     var genericNameParam = new OracleParameter("name", OracleDbType.VarChar)
                     {
                        Value = arrayGenericName,
                        Direction = ParameterDirection.Input
                     };
                     var lastUpdatedDateParam = new OracleParameter("LastUpdatedDt", OracleDbType.Date)
                     {
                        Value = arrayLastUpdatedDate,
                        Direction = ParameterDirection.Output
                     };
                     command.Parameters.Add(genericNameParam);
                     command.Parameters.Add(idParam);
                     command.Parameters.Add(lastUpdatedDateParam);

                     command.ExecuteArray(array.Length);
                  }
               }
               transaction.Complete();
            }       


Please let us know what you think, guys.
Meanwhile I'm sending demo project to support@devart.com

Thanks!
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Thu 05 Feb 2015 17:32

Thank you for your report. We have reproduced the issue and are investigating it. We will notify you about the result.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Wed 25 Feb 2015 17:01

Hi Devart Team,
Just want to follow up on this issue.
Were you able to fix this?
This affects part of our functionality unfortunately.

Thanks!
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Thu 26 Feb 2015 12:27

Please try the latest (8.4.359 26-Feb-15) build of dotConnect for Oracle. The issue should be fixed. Notify us about the result.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Thu 19 Mar 2015 10:27

Hi Devart,

I was able to test this, but the issue still exists.
We have Direct connection with Pooling and Unicode set to true.
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Thu 19 Mar 2015 16:01

We cannot reproduce the issue at the moment.

1. Please set a break point in the code, run your application in the Debug mode, navigate to Debug > Windows > Modules and make sure that the only Devart.* assemblies loaded in the process of your application are:
Devart.Data.dll v5.00.1151.0
Devart.Data.Oracle.dll v8.04.359.0

2. Specify the exact text of your current error and its full call stack.

3. Are you using exactly the same code for reproducing which is listed at http://forums.devart.com/viewtopic.php?f=1&t=31214#p107245?

4. Tell us the full version of your Oracle server.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Thu 19 Mar 2015 16:50

Here are the details:
1. Yes, Devart.Data and Devart.Data.Oracle are exactly the same as you indicated.

2. Error is: NET: Unknown error 1
Full stack:
at Devart.Data.Oracle.DirectUtils.c(Int32 A_0)
at Devart.Data.Oracle.d.a()
at Devart.Data.Oracle.l.a(d A_0, Int32 A_1)
at Devart.Data.Oracle.l.a(Int32 A_0, ci A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at Devart.Data.Oracle.OracleCommand.a(Int32 A_0, Boolean A_1, Int64[]& A_2)
at Devart.Data.Oracle.OracleCommand.ExecuteArray(Int32 iters)
at BulkWithClob.Program.Main(String[] args) in c:\Users\alexander.efimov\AppData\Local\JetBrains\ReSharper\v8.2\vs11.0\visual studio 2012\Projects\BulkWithClob\BulkWithClob\Program.cs:line 48
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

3. Code is the same as I see:
Code: Select all
string connectionString = "User Id=;Password=;Direct=true;Data Source=;Port=1521;SID=;Pooling=true;Unicode=true";
            using (var transaction = new TransactionScope(TransactionScopeOption.Required,
               new TransactionOptions {IsolationLevel = IsolationLevel.ReadCommitted}))
            {
               using (OracleConnection connection = new OracleConnection(connectionString))
               {
                  connection.Open();
                  using (var command = connection.CreateCommand())
                  {
                     var array = new decimal?[1];
                     array.SetValue((decimal?) 2, 0);
                     var arrayGenericName = new String[1];
                     arrayGenericName.SetValue("TEST DATA", 0);
                     var arrayLastUpdatedDate = new DateTime[1];
                     command.CommandText = "update  GMSRCA200.TEST set name = :name where id = :id RETURNING  LAST_UPDATED_DT INTO  :LastUpdatedDt";
                     command.PassParametersByName = true;
                     var idParam = new OracleParameter("id", OracleDbType.Number)
                     {
                        Value = array,
                        Direction = ParameterDirection.Input
                     };
                     var genericNameParam = new OracleParameter("name", OracleDbType.VarChar)
                     {
                        Value = arrayGenericName,
                        Direction = ParameterDirection.Input
                     };
                     var lastUpdatedDateParam = new OracleParameter("LastUpdatedDt", OracleDbType.Date)
                     {
                        Value = arrayLastUpdatedDate,
                        Direction = ParameterDirection.Output
                     };
                     command.Parameters.Add(genericNameParam);
                     command.Parameters.Add(idParam);
                     command.Parameters.Add(lastUpdatedDateParam);

                     command.ExecuteArray(array.Length);
                  }
               }
               transaction.Complete();
            }       
}


4.
Code: Select all
Select * from v$version
gives the following:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for HPUX: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 – Production
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Mon 23 Mar 2015 09:44

Hi guys,
Were you able to reproduce the issue based on the latest information I provided?
Thanks.

Best regards,
Alexander Efimov.
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Tue 24 Mar 2015 13:48

Thank you for the additional information. We have reproduced the issue. It is specific to 11.2.0.4. The investigation is in progress. As soon as we have any results, we will let you know.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Tue 05 May 2015 12:18

Hi guys! How are you doing? Are there any updates on this particular issue?
Thanks!
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Thu 07 May 2015 15:19

The bug is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Shalex » Fri 29 May 2015 07:38

The bug with throwing "NET: Unknown error 1" in the Direct mode for Oracle v11.2.0.4 is fixed in dotConnect for Oracle v8.4.422.

It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=31864.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: NET: Unknown Error 1 when updating.

Postby Partizan » Mon 13 Jul 2015 15:17

Hi guys!
This post is to confirm that the issue was fixed with the last update - 8.4.447.0
Thanks!
Partizan
 
Posts: 36
Joined: Fri 13 Nov 2009 10:18

Re: NET: Unknown Error 1 when updating.

Postby Benabdallah » Thu 18 Feb 2016 10:32

hello,
i have the same problem with the same error message, when i try to acces CLOB field how throw out of memory exception in the first call, and when i retry i have the same message error (NET: Unknown error 1),
i have even try to use the latest version (New build of dotConnect for Oracle 8.4.422 ) but that not resolve my problem.

my error message:
System.Exception was unhandled
Message: An unhandled exception of type 'System.Exception' occurred in Devart.Data.Oracle.dll
Additional information: NET: Unknown error 1

my call stak:

at Devart.Data.Oracle.DirectUtils.c(Int32 A_0)
at Devart.Data.Oracle.DirectUtils.a()
at Devart.Data.Oracle.d.a(Byte A_0)
at Devart.Data.Oracle.j.a(Byte A_0)
at Devart.Data.Oracle.bv.b()
at Devart.Data.Oracle.bf.b()
at Devart.Data.Oracle.bn.b()
at Devart.Data.Oracle.l.a(Int32 A_0, co A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at Devart.Data.Oracle.OracleCommand.ExecuteReader()
at Outmail.EnvoyerEmailForm.ListeMessageATraite(Decimal IndEnvoi, Int32 MailParLot) in d:\STNV3\Corrections\Fixes\Fix_03\Dotnet\STNNet.Batch\Outmail\Form1.cs:line 569
at Outmail.EnvoyerEmailForm.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) in d:\STNV3\Corrections\Fixes\Fix_03\Dotnet\STNNet.Batch\Outmail\Form1.cs:line 1738
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

thinks.
Benabdallah
 
Posts: 1
Joined: Thu 18 Feb 2016 10:19

Re: NET: Unknown Error 1 when updating.

Postby Pinturiccio » Thu 18 Feb 2016 16:05

Please create and send us a small test project with the corresponding DDL script for reproducing the issue.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Next

Return to dotConnect for Oracle