Entity Framework connect to Oracle: ODP for .NET "does not support time"

SeanMC

I have an Entity framework set up where I have a remote Oracle Server that I've configured through the connection string and I'm not running some unit Tests to confirm connection. I'm using Oracle.ManagedDataAccess.Client

I'm getting the error: System.NotSupportedException: Oracle Data Provider for .NET does not support Time.

I can't find anyone getting this error before. I was thinking my tables in my Oracle DB might have many mentions to time, but they only have DATE. I have to do it this way, I won't be able to just access the DB a different way for this project.

What could be causing this error? How can I remedy it?

kevinsky

If you have dates stored as '2015-06-30 08:13:24' this is a date time literal.

As the documentation states

ODP.NET does not support Time literals and canonical functions related to the Time type.

Look through your tables for dates stored as VARCHAR2. I can say from experience that EF4 at a minimum has no problem with DATE or TIMESTAMP fields so the problem you have has to be somewhere else.

I would not normally consider storing a time in a CHAR variable. In EF I have frequently had to CAST values to a more acceptable datatype. As an example:

select CAST(your_date ||' '||your_time AS DATE) AS your_field from your_table;

You may be running into an issue with using Oracle keywords in your column names. Here is a list of Oracle keywords and reserved words. TIME is included in the list. If you have column names called TIME this could be your problem.

Try making a view of the table where you rename TIME to TIME_T or something.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Oracle ODP.Net With Entity Framework 6 - TypeInitializationException - CreateConnection()

From Dev

Oracle ODP.Net With Entity Framework 6 - Entity framework database compatible provider could not be found

From Dev

Use Entity Framework with existing ORACLE DB. Visual Studio 2012 and Deprecated ODP.NET Driver

From Dev

How to connect Oracle with odp.net without install Oracle client

From Dev

Oracle ODP.NET error

From Dev

Is this a bug in the Oracle ODP.NET

From Dev

Is this a bug in the Oracle ODP.NET

From Dev

How do you connect from ODP.NET to Oracle (12G+) by proxy user with no password

From Dev

.net entity framework with oracle 11g

From Dev

.net entity framework with oracle 11g

From Dev

ODP.NET (Oracle Data Provider) schema

From Dev

How to use a Oracle database in ASP.NET without Entity Framework?

From Dev

Oracle Database 10g to .Net types with Entity Framework

From Dev

Entity framework 6 and oracle

From Dev

Entity Framework for Oracle DB

From Dev

ORA-12154 error trying to connect using ODP .NET

From Dev

Having trouble querying USER_OBJECTS in Oracle/ODP.NET

From Dev

Performing an Oracle Transaction using C# and ODP.NET

From Dev

Does the Managed Oracle ODP.NET driver utilize network encryption?

From Dev

NLS environment settings and Oracle Managed ODP.Net

From Dev

Passing Record type from Managed ODP.NET to Oracle Procedure

From Dev

Passing array of UDT argument to Oracle Stored Procedure in ODP.NET

From Dev

Replacing TableAdapters with Oracle.DataAccess.Client (ODP.NET)

From Dev

Connect to database failed, Entity Framework

From Dev

Connect to Amazon RDS with Entity Framework

From Dev

Entity Framework .Net

From Dev

entity framework error in .net

From Dev

Entity framework 6.0 with oracle 11

From Dev

.NET Membership in ASP.NET MVC4 and Entity Framework with Oracle as Db

Related Related

  1. 1

    Oracle ODP.Net With Entity Framework 6 - TypeInitializationException - CreateConnection()

  2. 2

    Oracle ODP.Net With Entity Framework 6 - Entity framework database compatible provider could not be found

  3. 3

    Use Entity Framework with existing ORACLE DB. Visual Studio 2012 and Deprecated ODP.NET Driver

  4. 4

    How to connect Oracle with odp.net without install Oracle client

  5. 5

    Oracle ODP.NET error

  6. 6

    Is this a bug in the Oracle ODP.NET

  7. 7

    Is this a bug in the Oracle ODP.NET

  8. 8

    How do you connect from ODP.NET to Oracle (12G+) by proxy user with no password

  9. 9

    .net entity framework with oracle 11g

  10. 10

    .net entity framework with oracle 11g

  11. 11

    ODP.NET (Oracle Data Provider) schema

  12. 12

    How to use a Oracle database in ASP.NET without Entity Framework?

  13. 13

    Oracle Database 10g to .Net types with Entity Framework

  14. 14

    Entity framework 6 and oracle

  15. 15

    Entity Framework for Oracle DB

  16. 16

    ORA-12154 error trying to connect using ODP .NET

  17. 17

    Having trouble querying USER_OBJECTS in Oracle/ODP.NET

  18. 18

    Performing an Oracle Transaction using C# and ODP.NET

  19. 19

    Does the Managed Oracle ODP.NET driver utilize network encryption?

  20. 20

    NLS environment settings and Oracle Managed ODP.Net

  21. 21

    Passing Record type from Managed ODP.NET to Oracle Procedure

  22. 22

    Passing array of UDT argument to Oracle Stored Procedure in ODP.NET

  23. 23

    Replacing TableAdapters with Oracle.DataAccess.Client (ODP.NET)

  24. 24

    Connect to database failed, Entity Framework

  25. 25

    Connect to Amazon RDS with Entity Framework

  26. 26

    Entity Framework .Net

  27. 27

    entity framework error in .net

  28. 28

    Entity framework 6.0 with oracle 11

  29. 29

    .NET Membership in ASP.NET MVC4 and Entity Framework with Oracle as Db

HotTag

Archive