Page 1 of 1

Value stored in a wrong column after insert

Posted: Tue 29 Nov 2011 16:47
by dvpnello
Hello,

I installed the latest versions 6.50.250 and 6.50.244 because those fixed the previous ticket 'ORA-01400 for 6.5 on Oracle 10gEE 10.2.0.4.0 64bit'. However, I’m experiencing various mapping problems that were not present in the 6.50.228 version. These are independent from the Oracle DB version.
I have isolated a simple one here. The code makes an insert for a new CONFIG_PARM row (see the code below for the table definition). The insert is performed without errors, but the RECORD_STATUS_CD value is actually stored in the wrong column (LAST_MAINT_NM).

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using ONE2ONEXEContext;

/*
 * 
CREATE TABLE ONE2ONE.CONFIG_PARM
(
  CONFIG_PARM        NVARCHAR2(50),
  CONFIG_PARM_DESCR  NVARCHAR2(500),
  ADD_DT             DATE,
  ADD_NM             NVARCHAR2(50),
  LAST_MAINT_DT      DATE,
  LAST_MAINT_NM      NVARCHAR2(50),
  RECORD_STATUS_CD   NVARCHAR2(1)               DEFAULT 'A'
);

ALTER TABLE ONE2ONE.CONFIG_PARM ADD (CONSTRAINT PK_CONFIG_PARM PRIMARY KEY (CONFIG_PARM));

*/
namespace O2OOracleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            ONE2ONEXEDataContext context = new ONE2ONEXEDataContext();
            CONFIG_PARM dm = new CONFIG_PARM() { CONFIG_PARM1 = "TestConfig", CONFIG_PARM_DESCR = "This is a test", RECORD_STATUS_CD = "A" };
            context.CONFIG_PARMs.InsertOnSubmit(dm);
            context.SubmitChanges();
            context.Dispose();

        }
    }
}
The application
- uses Direct Mode
- no custom mapping is defined in the data context
- the SQL code generated is

Code: Select all

INSERT INTO ONE2ONE.CONFIG_PARM (CONFIG_PARM, CONFIG_PARM_DESCR, ADD_DT, ADD_NM, LAST_MAINT_DT, LAST_MAINT_NM, RECORD_STATUS_CD) VALUES (:p1, :p2, :p3, :p4, :p5, :p6, :p7) 
-- p1: Input NVarChar (Size = 10; DbType = String) [TestConfig]
-- p2: Input NVarChar (Size = 14; DbType = String) [This is a test]
-- p3: Input Date (Size = 0; DbType = DateTime) []
-- p4: Input NVarChar (Size = 0; DbType = String) []
-- p5: Input Date (Size = 0; DbType = DateTime) []
-- p6: Input NVarChar (Size = 0; DbType = String) []
-- p7: Input NVarChar (Size = 1; DbType = String) [A]
-- Context: Devart.Data.Oracle.Linq.Provider.OracleDataProvider Model: an Build: 3.0.16.0 
Please let me know in case you need the full sample.
Many thanks

Posted: Wed 30 Nov 2011 16:13
by StanislavK
Thank you for the report, we have reproduced the issue. We will analyze it and inform you about the results as soon as possible.

Posted: Tue 06 Dec 2011 18:51
by dvpnello
Please let me know as soon as you have any news since this is becoming a burning issue for us. At the moment having deployed components on 6.50.228, we can't deliver new functionality unless we roll back everything to 5.35. This would be a big effort.
Thanks

Posted: Thu 08 Dec 2011 16:28
by StanislavK
We have fixed this issue, but the fix will be available in the next build (the one we'll release after the 6.60.258 build) only.

We plan to release this new version in about two weeks, and will post here when it is published.

Please deliver the fix ASAP

Posted: Fri 09 Dec 2011 07:58
by davide_lenza
Hi,
We are blocked by this issue since three weeks. Can you please deliver the fix before if you have already solve the problem?
Thanks
Davide

Posted: Fri 09 Dec 2011 16:34
by StanislavK
Please contact us ( support*devart*com ) by mail. In the letter, please specify your license number and the mail address you used to register for dotConnect for Oracle. We will send you a build including this fix.

Posted: Mon 26 Dec 2011 08:05
by StanislavK
We have released the new 6.60.268 build of dotConnect for Oracle, which includes the fix for the issue with NVARCHAR parameters. The new build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only).

For the detailed information about the fixes and improvements available in dotConnect for Oracle 6.60.268, please refer to
http://www.devart.com/forums/viewtopic.php?t=22977