ORA-01460 in release 6.80.325.0

ORA-01460 in release 6.80.325.0

Postby mryerro » Tue 20 Mar 2012 15:37

Hello!

I have downloaded this morning the latest version 6.80.325 and I have obtained the following error:

InnerException: Devart.Data.Oracle.OracleException
Message=ORA-01460: unimplemented or unreasonable conversion requested
Source=Devart.Data.Oracle
ErrorCode=-2147467259
Code=1460
Offset=0
StackTrace:
at Devart.Data.Oracle.t.d()
at Devart.Data.Oracle.aq.h()
at Devart.Data.Oracle.aq.c()
at Devart.Data.Oracle.aa.a(Int32 A_0, bt 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.Entity.e.a(CommandBehavior A_0)
at Devart.Data.Oracle.Entity.e.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

I have been doing some tests and it happens when we work with any accent mark, ñ or ç. We have seen that this happens when working on direct mode and unicode together. If we configure Unicode=false it doesnt happens or if we dont use direct mode it also works as expected. We need Unicode for chinese characters and we use direct mode in development scenarios.

Thanks in advance
mryerro
 
Posts: 2
Joined: Tue 20 Mar 2012 15:23

Postby Pinturiccio » Mon 26 Mar 2012 10:21

We could not reproduce the issue. An exception does not occur in our enviroment. Could you please Send us a small test project with DDL/DML scripts for reproducing the issue?
Could you please specify the NLS_LANGUAGE, NLS_CHARACTERSET, NLS_NCHAR_CHARACTERSET parameters of your server?
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby mryerro » Wed 09 May 2012 16:40

Hi,

Due to confidential information i cant upload my project but with the code below I reproduced the problem. You just need a table with one Varchar2 column.

Our connection string looks like this:

Code: Select all
<add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=Devart.Data.Oracle;provider connection string=&quot;User Id=XXXXX;Password=XXXXXX;Server=XXX.XXX.XXX.XXX;Unicode=True;Direct=True;Service Name=XXXXX;Persist Security Info=True&quot;" providerName="System.Data.EntityClient" />


A sample console program to test the problem:

Code: Select all
static void Main(string[] args)
        {
            Console.WriteLine("START");

            //Context
            var context = new Entities();
            var sql = new StringBuilder("SELECT NAME FROM ONETABLE WHERE UPPER(NAME) LIKE :parameter");

            var parameters = new List<DbParameter>
                                 {
                                     new OracleParameter(){ParameterName = "parameter", Value = "%" + "fails with ñ".ToUpper() + "%"}
                                 };

            var sqlResult = context.ExecuteStoreQuery<string>(sql.ToString(), parameters.ToArray());
            foreach (var item in sqlResult)
            {
                Console.WriteLine(item);
            }
           
            Console.WriteLine("END");
            Console.ReadLine();
        }


The exception is:

Code: Select all
Devart.Data.Oracle.OracleException was unhandled
Message=ORA-01460: unimplemented or unreasonable conversion requested
Source=Devart.Data.Oracle
ErrorCode=-2147467259
Code=1460
Offset=17
StackTrace:
at Devart.Data.Oracle.t.d()
at Devart.Data.Oracle.aq.h()
at Devart.Data.Oracle.aq.c()
at Devart.Data.Oracle.aa.a(Int32 A_0, bt 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()
at System.Data.Objects.ObjectContext.ExecuteStoreQueryInternal[TElement](String commandText, String entitySetName, MergeOption mergeOption, Object[] parameters)
at System.Data.Objects.ObjectContext.ExecuteStoreQuery[TElement](String commandText, Object[] parameters)
at TestSql.ProgramSummary.Main(String[] args) in C:\TestSql\TestSql\ProgramSummary.cs:line 26
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


Our database configuration is:
- NLS_CHARACTERSET: AL32UTF8
- NLS_LANGUAGE: AMERICAN
- NLS_NCHAR_CHARACTERSET: AL16UTF16

Thanks in advance,
mryerro
 
Posts: 2
Joined: Tue 20 Mar 2012 15:23

Re: ORA-01460 in release 6.80.325.0

Postby Pinturiccio » Mon 14 May 2012 11:06

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby Pinturiccio » Tue 10 Jul 2012 11:55

We have fixed the bug with ORA-01460 in the Direct Mode when the Unicode connection string parameter equals true. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby frippi » Fri 13 Jul 2012 10:49

Hello.

So, has it been fixed? I recently updated dotConnect from 6.5 to 7.0.25 and started to experiense this issue.

Vitaliy.
frippi
 
Posts: 2
Joined: Fri 13 Jul 2012 10:44

Re: ORA-01460 in release 6.80.325.0

Postby Pinturiccio » Fri 13 Jul 2012 13:43

dotConnect for Oracle 7.0.25 was released on June 21, 2012 and the bug was fixed on July 10, 2012, so the fix could not be included into version 7.0.25. The fix will be included into the next public build. We're planning to release it next week. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby frippi » Fri 13 Jul 2012 16:34

Great. Thank you for the update and your hard work!
frippi
 
Posts: 2
Joined: Fri 13 Jul 2012 10:44

Re: ORA-01460 in release 6.80.325.0

Postby Pinturiccio » Thu 19 Jul 2012 07:26

The new build of dotConnect for Oracle 7.1.40 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=24522
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby foka » Thu 10 Oct 2013 09:28

Hello,
I have the same issue on Oracle 11g Express Edition when I use both Unicode=True and Direct=True in connection string. I've checked on 6.80.341.0 and the latest 7.9.333.0.

Here's my repro. You need just one NVARCHAR2 column.
Code: Select all
using Devart.Data.Oracle;

namespace MonoOracleBenchmark
{
   class Program
   {
      static void Main()
      {
         const string connectionString = "Data Source=localhost;Persist Security Info=True;SID=XE;User ID=XXX;Password=XXX;"
            + "Direct=True;Unicode=True;";
         var query = "select u.last_name from \"user_data\" u where u.last_name=:p0";
         // If I pass the same condition in query (without a parameter) as below, everything works fine.
         //query = "select u.last_name from \"user_data\" u where u.last_name='Użytkownik'";

         using (var oracleConnection = new OracleConnection(connectionString))
         {
            using (var command = oracleConnection.CreateCommand())
            {
               command.CommandText = query;
               command.Parameters.Add("p0", "Użytkownik");

               oracleConnection.Open();

               using (var reader = command.ExecuteReader())
               {
                  while (reader.Read())
                     System.Console.WriteLine(reader.GetValue(0));
                  reader.Close();
               }
            }
            oracleConnection.Close();
         }
      }
   }
}

Settings the same as mryerro's:
NLS_CHARACTERSET: AL32UTF8
NLS_LANGUAGE: AMERICAN
NLS_NCHAR_CHARACTERSET: AL16UTF16
foka
 
Posts: 2
Joined: Thu 10 Oct 2013 09:01

Re: ORA-01460 in release 6.80.325.0

Postby Pinturiccio » Thu 10 Oct 2013 14:39

We have reproduced the issue with dotConnect for Oracle 6.80.341.0. Howevere we cannot reproduce the issue with dotConnect for Oracle 7.9.333.0. Please make sure that when you run application with dotConnect for Oracle 7.9.333.0, the application loads theDevart.Data.Oracle.dll assembly of version 7.9.333.0. This can be done in the Modules window, which can be opened via the main menu of Visual Studio: Debug->Windows->Modules.

To run the application with assemblies from dotConnect for Oracle 7.9.333.0, perform the following actions:
1. Uninstall dotConnect for Oracle;
2. Remove all Devart.* and policy.*.Devart.* files from the GAC;
3. Clear the Program Files\Devart\dotConnect and Program Files\Common Files\Devart\dotConnect folders;
4. Install dotConnect for Oracle 7.9.333.0;
5. Delete all files from the bin and obj folders and rebuild the project.
Pinturiccio
Devart Team
 
Posts: 1885
Joined: Wed 02 Nov 2011 09:44

Re: ORA-01460 in release 6.80.325.0

Postby foka » Fri 11 Oct 2013 07:37

Sorry Pinturiccio, you were right. "Modules" window showed that the old version was actually loaded in the app from different location.
So the bug does not appear in 7.9.333. Thank you!
foka
 
Posts: 2
Joined: Thu 10 Oct 2013 09:01


Return to dotConnect for Oracle