EF6: ORA-00910: specified length too long for its datatype

asp.net c# entity-framework entity-framework-6 oracle

Question

I'm using EF6 Code First with Oracle 12c.

I have a property that requires the data max length:

user.Property(u => u.PasswordHash).HasColumnType("NVARCHAR2").IsMaxLength();

PASSWORDHASH = c.String(maxLength: 32767, storeType: "nvarchar2")

when I try to migrate I get:

ORA-00910: specified length too long for its datatype

Extended DataType is enable in my database and I can create the table successfully using a script.

1
1
11/8/2016 6:48:00 PM

Popular Answer

I'm not sure what is below your c# code but 32767 is max length for PL/SQL if this goes with plain SQL limit is 4000. So I think you should change it to 4000.
The limit is in fact 4000 bytes so if you insert 2-byte character it gets less than 4000 chars.

0
11/8/2016 7:37:30 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow