Char column with no value used as key during delete

Char column with no value used as key during delete

Postby vbellema » Thu 21 Mar 2013 18:37

Hi, I have an issue with a table that contains a key with various field. But one of them is a char that is an empty char(4).

The primary key is:

ETA_CD CHAR(2),
PERM_CD CHAR(12),
PGM_CD CHAR(4),
DIP_REP_NO CHAR(1),
CON_CD CHAR(4).

The problem is that the fields CON_CD can sometimes be null. For this purpose Oracle filled this field with 4 white spaces.

So when I try to delete a record that contains CON_CD "null", I get an error message telling me that the record has been modified and can't be deleted.

When I trace the transaction log, I get this query:

DELETE FROM [TABLE] WHERE ETA_CD = :key1
AND PERM_CD = :key2
AND PGM_CD = :key3
AND DIP_REP_NO = :key4
AND CON_CD = :key5
-- key1: Input Char (Size = 2; DbType = String) [01]
-- key2: Input Char (Size = 12; DbType = String) [ABCD12345678]
-- key3: Input Char (Size = 4; DbType = String) [1234]
-- key4: Input Number (Size = 0; DbType = Decimal) [0]
-- key5: Input Char (Size = 0; DbType = String) []
KEY5 should be filled by 4 blanks char

-- Context: Devart.Data.Oracle.Linq.Provider.OracleDataProvider
Model: MetaModel Build: 4.1.184.0


Can you please help me with my situation?
thanks
vbellema
 
Posts: 4
Joined: Thu 21 Mar 2013 18:09

Re: Char column with no value used as key during delete

Postby MariiaI » Mon 25 Mar 2013 11:21

Thank you for the report. This is a known issue and it has been already fixed. The fix will be included in the next build of LinqConnect. We will inform you when it is available for download.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)