Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

.Net 8.0.8 - Entity Framework - Oracle 23.5.1 - PLS-00382 Dates not inserting.

Peter DeSimoneAug 16 2024 — edited Aug 16 2024

Oracle.ManagedDataAccess.Core 23.5.1
Oracle.EntityFrameworkCore 8.23.50
Microsoft.EntityFrameworkCore 8.0.8
Database: Oracle 19

EF class

    \[Column("LASTACTIVITYDATE", TypeName = "DATE")\]  
   public DateTime LastActivityDate { get; set; }

Date being set via DateTime.UtcNow (Although Datetime.Now attempted)

Error:

  ---> Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-06550: line 15, column 10:  

PLS-00382: expression is of wrong type

EF debugging says the parameter is this:
DateTime.UtcNow
:p5='2024-08-16T15:40:03.8466907Z' (DbType = Date)

DateTime.Now
:p5='2024-08-16T12:03:26.4111098-04:00' (DbType = Date)

Am I missing something about Oracle 23+ about inserting date values (that aren't defaulted) into the db?

This post has been answered by Alex Keh-Oracle on Aug 21 2024
Jump to Answer
Comments
Post Details
Added on Aug 16 2024
7 comments
140 views