Tables of database error using Entity Framework mapping

Hello!

I am developing a project using the ODAC 11.2 module 4 and EF 5.0. I have the .edmx file and I had generated entities with EF 5.x DbContext generator model.

The error occurs when trying to access one of the properties (postcode) of my entity 'address '. This column is a Number type (5) in the database, but it is mapped in the entity as the short type.

I run this LINQ and I get the error: "the value was too large or too small for an Int16.

var query = from b in the present. ADDRESS

Select b.PC;

Test of list < short? > = query8. ToList();

I think it was a problem with the map. Could you help me?

Thank you very much

First, you must use ODAC 11.2 version 5 or higher. This version is certified with EF 5.

Normally, Number (5) is mapped by default to an Int16. Not sure how you map it to a short circuit. In any case, if you explicitly want to map any type of data default data type, you can use the following mapping customization described here in the doc:

ADO.NET Entity Framework and LINQ to Entities

Tags: Database

Similar Questions

  • How to automatically generate associations in the EDMX using Entity Framework 'database first'?

    Hello.  I'm new on Entity Framework and the database that I connect Oracle 10 g.  I develop using Visual Studio 2015, ODAC 12 c version 4 with the installed Visual Studio Tools and EF 6.1.3.  I am generation an EDMX model from an existing database.  In the Visual Studio wizard, I select the existing tables that have relationships of foreign key between them.  The resulting EDMX contains the tables and their columns, but no association.  I tried to do this using the code first of all existing database Wizard, and the results are similar: classes for the tables and column properties, but still no association or the properties of a class to contain instances of another.  Should I be not expecting associations to be created automatically?  Is there something I missed?

    I'm back in it and found out what the problem was.  Before you create the entity data model, I had to have the connection already defined in Server Explorer * using the ODP.NET* provider.

  • Entity framework problem and the types of courts

    I use Entity Framework in Visual Studio to access a table in my oracle database. Problem is when you select a record in run mode, the following error appears:
    Value was either too large or too small for an Int16

    This error comes when trying to access a table declared as number field (5). The framework reflects this in a short runway. The max value for short is 32767, but the value in the table is 36001.

    I can solve this?

    Thank you.

    Yes, you must change the mapping of this type to an Int32. For this you can add this to your config file:






    You should then update the model for the new changes. Note that I found that I have to manually change the types in the model, but after I do this once it works fine. The documentation is here: http://docs.oracle.com/cd/E11882_01/win.112/e18754/featLINQ.htm

  • Entity Framework stored procedure Mapping - OUT unrecognized parameter

    I use the following software:

    • ODP.NET 12 c Release 3
    • Entity Framework 6
    • Visual Studio 2013, SP3
    • Oracle 11g Server

      I created a package containing a stored procedure to update a row in a table.  The procedure is an OUT parameter (named ROWS_AFFECTED) which returns the number of rows affected.

      CREATE OR REPLACE PACKAGE BODY TST. Customer_Procs
      AS
      PROCEDURE Update_Customer
      (
      CUST_ID IN NUMBER,
      WHAT IN VARCHAR2,
      L_NAME IN VARCHAR2,
      EMAIL IN VARCHAR2,
      LAST_UPDATE TIMESTAMP IN
      ROWS_AFFECTED NUMBER
      )
      AS
      BEGIN
      UPDATE
      TST. CUSTOMER
      SET
      NAME = WHAT,.
      LAST_NAME = L_NAME,
      EMAIL_ADDR = EMAIL,
      LAST_UPDT_TIME = CURRENT_TIMESTAMP
      WHERE
      CUSTOMER_ID = CUST_ID
      AND LAST_UPDT_TIME = LAST_UPDATE;

      ROWS_AFFECTED: = NUMBER OF ROWS SQL %;

      END Update_Customer;


      I executed successfully the stored procedure in SQL * more.  The ROWS_AFFECTED OUT parameter is filled with the good

      value.

      I imported the stored procedure in my Entity Framework model using the function successfully import.

      I then traced the parameters of the stored procedure to my entity properties. The ROWS_AFFECTED parameter is shown in the stored procedure mappings, but the "rows affected parameter" check box is cleared.

      Attempt to run my results in the following exception being throw:
      "CustomerModel.msl (22,12): error 2047: a mapping liaison function specifies a function.

      CustomerModel.Store.CUSTOMER_PROCS_UPDATE_CUSTOMER with a parameter not supported: ROWS_AFFECTED. Output parameters cannot

      be mapped through the RowsAffectedParameter property. Use the result links to return values from a function call.

      I am trying to determine what I need to do in order to have the Entity Framework to recognize the ROWS_AFFECTED OUT parameter in the

      stored procedure chart for concurrency control.

      I found a solution: try to declare ROWS_AFFECTED such as 'PLS_INTEGER' instead of 'NUMBER '.  This solved it for me.

    • One-way replication using queries and mapping DML - error

      Environment: Unique Windows physical system and Oracle 11 g R2 DB of EA. Two schemas with the structure of the different tables. This is a home office staff.
      The order of the day: runs DML replication of 2 tables to another single table with use of query and chips

      Disclaimer: I have read the guide e17791.pdf Admin and checked the forum before asking this question here.

      My excerpt:
      EXTRACT srcextm
      USERID gguser, PASSWORD gguser
      --DDL
      TRANLOGOPTIONS EXCLUDEUSER gguser
      RMTHOST localhost, MGRPORT 7809
      RMTTRAIL G:\app\gg32\dirdat\mt
      TABLE source.*,
      SQLEXEC (ID query2col, QUERY "select a.sno as sno, a.name as name, b.phone as phone from source.test a, source.contact_no b where a.sno=1 and a.sno=b.sno"),
      TOKENS (TK_SNO           = @GETVAL(query2col.sno),
              TK_NAME      = @GETVAL(query2col.name),
              TK_PHONE       = @GETVAL(query2col.phone));
      Replicat:
      REPLICAT srcrepm
      SOURCEDEFS G:\app\gg32\dirsql\sourcedefs.sql
      --DDLERROR DEFAULT IGNORE
      USERID gguser, PASSWORD gguser
      MAP source.*, TARGET target.directory,
      colmap(USEDEFAULTS,
      SNO= @Token("TK_SNO"),
      NAME= @Token("TK_NAME"),
      PHONE= @Token("TK_PHONE"));
      Replicat report:
      ***********************************************************************
                       Oracle GoldenGate Delivery for Oracle
            Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
              Windows (optimized), Oracle 11g on Apr 23 2012 06:24:05
       
      Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
      
      
                          Starting at 2012-10-15 10:00:34
      ***********************************************************************
      
      Operating System Version:
      Microsoft Windows 7 , on x64
      Version 6.1 (Build 7600: )
      
      Process id: 8932
      
      Description: 
      
      ***********************************************************************
      **            Running with the following parameters                  **
      ***********************************************************************
      
      2012-10-15 10:00:34  INFO    OGG-03035  Operating system character set identified as windows-1252. Locale: en_US, LC_ALL:.
      REPLICAT srcrepm
      
      SOURCEDEFS G:\app\gg32\dirsql\sourcedefs.sql
      
      --DDLERROR DEFAULT IGNORE
      
      USERID gguser, PASSWORD ******
      
      MAP source.*, TARGET target.directory,
      
      colmap(USEDEFAULTS,
      
      SNO= @Token("TK_SNO"),
      
      NAME= @Token("TK_NAME"),
      
      PHONE= @Token("TK_PHONE"));
      
      
      2012-10-15 10:00:34  INFO    OGG-01815  Virtual Memory Facilities for: COM
          anon alloc: MapViewOfFile  anon free: UnmapViewOfFile
          file alloc: MapViewOfFile  file free: UnmapViewOfFile
          target directories:
          G:\app\gg32\dirtmp.
      
      CACHEMGR virtual memory values (may have been adjusted)
      CACHESIZE:                              512M
      CACHEPAGEOUTSIZE (normal):                4M
      PROCESS VM AVAIL FROM OS (min):           1G
      CACHESIZEMAX (strict force to disk):    881M
      
      Database Version:
      Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
      PL/SQL Release 11.2.0.1.0 - Production
      CORE     11.2.0.1.0     Production
      TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
      NLSRTL Version 11.2.0.1.0 - Production
      
      Database Language and Character Set:
      NLS_LANG         = ".WE8MSWIN1252" 
      NLS_LANGUAGE     = "AMERICAN" 
      NLS_TERRITORY    = "AMERICA" 
      NLS_CHARACTERSET = "WE8MSWIN1252" 
      
      ***********************************************************************
      **                     Run Time Messages                             **
      ***********************************************************************
      
      Opened trail file G:\app\gg32\dirdat\mt000000 at 2012-10-15 10:00:34
      
      Wildcard MAP resolved (entry source.*):
        MAP "SOURCE"."TEST", TARGET target.directory, colmap(USEDEFAULTS, SNO= @Token("TK_SNO"), NAME= @Token("TK_NAME"), PHONE= @Token("TK_PHONE"));
      Using the following default columns with matching names:
        SNO=SNO, NAME=NAME
      Using the following key columns for target table TARGET.DIRECTORY: SNO.
      
      
      
      2012-10-15 10:00:34  WARNING OGG-01004  Aborted grouped transaction on 'TARGET.DIRECTORY', Database error 1403 (OCI Error ORA-01403: no data found, SQL <UPDATE "TARGET"."DIRECTORY" SET "NAME" = :a1,"PHONE" = :a2 WHERE "SNO" = :b0>).
      
      2012-10-15 10:00:34  WARNING OGG-01003  Repositioning to rba 984 in seqno 0.
      
      2012-10-15 10:00:34  WARNING OGG-01154  SQL error 1403 mapping SOURCE.TEST to TARGET.DIRECTORY OCI Error ORA-01403: no data found, *SQL <UPDATE "TARGET"."DIRECTORY" SET "NAME" = :a1,"PHONE" = :a2 WHERE "SNO" = :b0>*.
      
      2012-10-15 10:00:34  WARNING OGG-01003  Repositioning to rba 984 in seqno 0.
      
      Source Context :
        SourceModule            : [er.errors]
        SourceID                : [er/errors.cpp]
        SourceFunction          : [take_rep_err_action]
        SourceLine              : [623]
      
      2012-10-15 10:00:34  ERROR   *OGG-01296  Error mapping from SOURCE.TEST to TARGET.DIRECTORY.*
      
      ***********************************************************************
      *                   ** Run Time Statistics **                         *
      ***********************************************************************
      
      Last record for the last committed transaction is the following: 
      ___________________________________________________________________
      Trail name :  G:\app\gg32\dirdat\mt000000
      Hdr-Ind    :     E  (x45)     Partition  :     .  (x04) 
      UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41) 
      RecLength  :    77 (x004d)    IO Time    : 2012-10-15 09:23:18.000000  
      IOType     :    15  (x0f)     OrigNode   :   255  (xff)
      TransInd   :     .  (x03)     FormatType :     R  (x52)
      SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
      AuditRBA   :          7       AuditPos   : 31137808
      Continued  :     N  (x00)     RecCount   :     1  (x01)
      
      2012-10-15 09:23:18.000000 FieldComp          Len    77 RBA 984
      Name: SOURCE.TEST
      ___________________________________________________________________
      
      Reading G:\app\gg32\dirdat\mt000000, current RBA 984, 0 records
      
      Report at 2012-10-15 10:00:34 (activity since 2012-10-15 10:00:34)
      
      From Table SOURCE.TEST to TARGET.DIRECTORY:
             #                   inserts:         0
             #                   updates:         0
             #                   deletes:         0
             #                  discards:         1
      
      
      Last log location read:
           FILE:      G:\app\gg32\dirdat\mt000000
           SEQNO:     0
           RBA:       984
           TIMESTAMP: 2012-10-15 09:23:18.000000
           EOF:       NO
           READERR:   0
      
      
      2012-10-15 10:00:34  ERROR   OGG-01668  PROCESS ABENDING.
      Note: I left out the statistics.

      DB data table:
      select * from source.test;
      SNO                    NAME            UPDATED                   EMAIL                          
      ---------------------- --------------- ------------------------- ------------------------------ 
      3                      Dickens            15-OCT-12 12.20.50.614000000 AM NA                             
      1                      Madhu      14-OCT-12 10.52.05.213000000 PM NA                             
      2                      Tom             14-OCT-12 10.52.05.213000000 PM NA                             
      
      3 rows selected
      Select * from source.contact_no;
      SNO                    PHONE      
      ---------------------- ---------- 
      1                      9888888885 
      2                      9888888886 
      
      2 rows selected
      Select * from target.directory;
      SNO                    NAME            PHONE      
      ---------------------- --------------- ---------- 
      
      0 rows selected
      At startup, the evening only replicate with the error above.

      My question is:
      Why is an update performed at Target.Directory table with the WHERE clause used in the SELECT query to my SNIPPET, which in turn, was intended for the SOURCE. TEST and SOURCE. CONTACT tables?

      Published by: MadhuGopanna on October 14, 2012 23:25: fixed select query. Same recurring error.

      "to replicate (exlisitly give source.test as a source)-
      Question: If I mention only source.test as a source, would have extracted ignore changes made to source.contact_no?

      Stating that -

      MAP source.*, TARGET target.directory
      

      sandbox say GG to you that you have what it takes to replicate all tables in the source schema in target.directory. -So, it's nonsense.

      "to extract (add section TABLEEXCLUDE to exclude the replication source.contact_no) -"
      Question: I want to reproduce the combination of test and contact_no of source data in the target.directory table. In this regard the TABLEEXCLUDE of source.contact_no will provide the desired result?

      TABLEEXCLUDE clause do not exclude the possibility of using the table in queries in SQLEXEC or anywhere else. He just exclude the table replication if you use wildcard characters.
      For example -.

      TABLE user.*;
      TABLE user.TEST;
      

      each user of schema table would be replicated except user. TEST.

      I think it is the right way to say what you want-

      EXTRACT ext1
      --connection to database--
      USERID ogg, PASSWORD xxxx
      --hostname and port for trail--
      --rmthost db-dev-2, mgrport 7809
      --path and name for trail--
      --rmttrail /u01/app/oracle/product/11.1.1.12ogg/dirdat/lt
      EXTTRAIL /u01/app/oracle/product/11.1.1.12ogg/dirdat/ss
      SEQUENCE test.*
      --DDL support
      DDL INCLUDE MAPPED OBJNAME test.*
      --DML
      TABLE source.TEST, SQLEXEC (ID query2col, QUERY "select b.phone as phone from source.test a, source.contact_no b where a.sno=:sno_params and a.sno=b.sno", PARAMS (sno_params = SNO)) TOKENS (TK_PHONE = @GETVAL(query2col.phone));
      TABLEEXCLUDE source.CONTACT_NO;
      
      --Replicat group --
      REPLICAT REP2
      --source and target definitions
      --ASSUMETARGETDEFS
      SOURCEDEFS /u01/app/oracle/product/11.1.1.1.2ogg411g/dirdef/sourcedef
      --target database login --
      USERID ogg, PASSWORD xxxx
      --file for dicarded transaction --
      DISCARDFILE /u01/app/oracle/product/11.1.1.1.2ogg411g/discard/rep1_discard.txt, APPEND, MEGABYTES 10
      --ddl support
      DDL
      --Specify table mapping ---
      MAP source.TEST, TARGET target.DIRECTORY, COLMAP (USEDEFAULTS, PHONE = @TOKEN ("TK_PHONE"));
      DDLERROR 24344 DISCARD;
      

      Just tested - works fine.

      Published by: Artem Khisamiev on 15.10.2012 08:00

      Published by: Artem Khisamiev on 18.10.2012 05:58

    • table or view does not exist error when you try to generate tables of database online.

      Hello

      I use Jdeveloper 12 c and is trying to generate tables of a database in offline mode, I created, for a connection of database online. The error message that appears is:

      java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist.

      More information:

      The database I use is Oracle11g Database Release 2. And I get a warning saying that the 12 c functionality will be lost when generating an 11 g database.

      In addition, the problem occurs only when I have foreign key constraints in my table. All the other tables that have no foreign key constraints generates very well.

      Any ideas why this happens?

      Thank you!

      Instead of directly generating the DB, generate a sql script. Then, you see the generated statement and can run the script using a db sql worksheet.

      If you get the error, you can view the script here.

      Timo

    • x 64 application entity Framework using Oracle.DataAccess.Client

      I am trying to build a x 64 application Entity Framework using the current Oracle.DataAccess.Client.  I can launch the application as Any CPU and x 86 using the managed provider, but when I compile for x 64, I get the error below when running. If I change the provider to Oracle.ManagedDataAccess.Client it works with x 86 and x 64 compiler.  Unfortunately, we are unable to use the managed provider until the xml is supported.  I have two clients x 86 and x 64 installed.  Any ideas?

      System.Data.EntityException was not handled

      HResult =-2146233087

      Message = the underlying provider failed to open.

      Source = System.Data.Entity

      StackTrace:

      at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

      at System.Data.EntityClient.EntityConnection.Open)

      at System.Data.Objects.ObjectContext.EnsureConnection)

      to System.Data.Objects.ObjectContext.SaveChanges (SaveOptions options)

      at System.Data.Entity.Internal.InternalContext.SaveChanges)

      at System.Data.Entity.Internal.LazyInternalContext.SaveChanges)

      at System.Data.Entity.DbContext.SaveChanges)

      at EntityFramework1.EFTest.AddItem (c:\TFS2012\AD). NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFramework1\EFTest.cs:line 21

      at EntityFrameworkConsole.Program.Main (String [] args) in c:\TFS2012\AD. NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFrameworkConsole\Program.cs:line 12

      at System.AppDomain._nExecuteAssembly (RuntimeAssembly assembly, String [] args)

      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly)

      at System.Threading.ExecutionContext.RunInternal (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

      at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

      at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)

      at System.Threading.ThreadHelper.ThreadStart)

      InnerException: Oracle.DataAccess.Client.OracleException

      HResult =-2147467259

      Message =""

      ErrorCode =-2147467259

      StackTrace:

      at Oracle.DataAccess.Client.OracleException.HandleErrorHelper (Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx * pOpoSqlValCtx, ByVal src, String procedure, Bcheck Boolean, Int32 isRecoverable)

      at Oracle.DataAccess.Client.OracleException.HandleError (Int32 errCode, OracleConnection conn, IntPtr, Object src opsErrCtx)

      at Oracle.DataAccess.Client.OracleConnection.Open)

      at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

      InnerException:

      Here is my web.config (less sensitive information):

      <? XML version = "1.0" encoding = "utf-8"? >

      < configuration >

      < configSections >

      < section name = "EF" type = "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' requirePermission ="false"/ >"

      < / configSections >

      < Entity Framework >

      < defaultConnectionFactory type = "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, Entity Framework" >

      < Parameters >

      < setting = "v11.0" / >

      < / Parameter >

      < / defaultConnectionFactory >

      < / Entity Framework >

      < connectionStrings >

      < add name = 'Entities' connection string connectionString="metadata=res://*/Models.EFEntities.csdl|res://*/Models.EFEntities.ssdl|res://*/Models.EFEntities.msl;provider=Oracle.DataAccess.Client;provider = & quot; data source = DATASOURCE; password = PASSWORD; persist info security = True; user ID = username & quot; "" ProviderName "/ >

      < / connectionStrings >

      < / configuration >

      Alex,

      Finally, we have solved the problem.  It turns out that we had a bad x 64 home path in the PATH variable.  I lost track of what it was originally, but I'm sure the x 64 bin path was correct. I did not notice that it was wrong, until I tried to install the full client and began to see an error indicating that it was missing a dll.  This led me to a post on the forum, in which you indicated that the PATH variable has not been set (ODAC 12 c for xcopy issues).  In our case, it is not missing, just fake.

      This is the behavior that we see if the PATH variable for the home directories and bin is incorrect:

      • Full client: an error of external system (no exceptions).  The error message is that the oraons.dll is missing.
      • XCOPY customer: generates an exception without error message.  The Exception.Message property is empty and there is no inner exception.

      Can the ODP team can add a meaningful message for this exception?  If the exact error cannot be highlighted during execution, a generic name on the path audit would help enormously.  I must have looked at it a dozen times and didn't notice that it was false.  If I had no idea that this could be the cause, it would be discussed more in detail, or had someone else Verify that it was correct.  I hope that we would have solved much earlier.

      Thank you.

    • Facing the question Entity framework with Oracle 11 g using MVC 4 connecting

      Hello

      I am trying to connect to Oracle through Entity Framework data.

      I created two projects

      ((1) one for the project Web MVC4 access data) 2.

      It works fine if I am trying to connect using the console Application and App.config, but facing the question trying to connect using we.config and the web application.

      I added using Nuget packages in data access project.

      I made reference to this dll aaccess of data in the web project and try to call the oracle connection.

      Package.config:

      < Package >

      < package id = "EF" version = "6.0.2" targetFramework = "net45" / >

      < package id = "odp.net.x64" version = "112.3.20" targetFramework = "net45" / > "

      < package id = "Oracle.ManagedDataAccess" version = "12.1.021" targetFramework = "net45" / > "

      < package id = "Oracle.ManagedDataAccess.EntityFramework" version = "12.1.021" targetFramework = "net45" / > "

      < / packages >

      Web.Config:

      < configuration >

      < configSections >

      <!-for more information on the configuration of the Entity Framework, visit http://go.Microsoft.com/fwlink/?LinkId=237468 ->

      < section name = "EF".

      type = 'System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089'

      requirePermission = "false" / >

      "< name =" article oracle.manageddataaccess.client"type =" OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "/ >

      < / configSections >

      < connectionStrings >

      < clear / >

      < name = "OracleDbContext" providerName = "Oracle.ManagedDataAccess.Client"

      connectionString ="Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = host address)(PORT=1521)) (CONNECT_DATA = (SERVICE_NAME = oracle))); User = username ID; Password = pwd; "/ >

      < / connectionStrings >

      < Entity Framework >

      <!-< defaultConnectionFactory type = "System.Data.Entity.Infrastructure.SqlConnectionFactory, Entity Framework" / >-->

      < defaultConnectionFactory type = "Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" > "

      < / defaultConnectionFactory >

      <>providers

      < invariantName = "Oracle.ManagedDataAccess.Client provider"

      Type = "Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / >

      < invariantName = "System.Data.SqlClient provider" type = "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" / > "

      < / providers >

      < / Entity Framework >

      < system.data >

      < DbProviderFactories >

      < remove invariant = "Oracle.ManagedDataAccess.Client" / > "

      "< add name =" ODP.NET, successful pilot"invariant =" Oracle.ManagedDataAccess.Client "description ="Oracle Data Provider for.NET, successful pilot"type =" Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342"/ >"

      < / DbProviderFactories >

      < system.data >

      < runtime >

      < assemblyBinding xmlns = "urn: schemas-microsoft-com: ASM.v1" >

      < dependentAssembly >

      < publisherPolicy apply = "no" / >

      < name = "Oracle.ManagedDataAccess assemblyIdentity" publicKeyToken = "89b483f429c47342" culture = "neutral" / > "

      < / dependentAssembly >

      < / assemblyBinding >

      < / SPAN >

      < oracle.manageddataaccess.client >

      < version number = "*" >

      < dataSources >

      < alias dataSource = "OracleDbContext" descriptor = "(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=hostname) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oracle)));" User = username ID; Password = pwd; "/ >

      < / dataSources >

      < / version >

      < /oracle.manageddataaccess.client >

      < / configuration >

      I am facing the sub question:

      Provider of the type EF ' Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "in the application for the vendor configuration file ADO.NET with invariant name 'Oracle.ManagedDataAccess.Client' could not be loaded." Make sure that the qualified assembly name is used and that the assembly is available in the currently running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

      Hello

      I tried with what follows and it started working.

      I just pointed out that line of defaultConnectionFactory in the web.config file

      Type = "Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / > "

      .

    • The use of tables of database for authentication in the ADF

      Hello

      I need to use my user table in the database for authentication in ADF (adf 11.1.2).

      I have 3 categories: agent admin and user is unique, each has its own page, logging, the application checks the type of user and directs its jsf task or the page of the jsf page flow.

      I have a user with the type attribute table

      HOW CAN I MAKE THIS PRAYER.

      Hello

      See links below.

      Whatever Fusion Middleware: Tables database user to implement authentication in the ADF

      Java / Oracle SOA blog: the use of tables of database as in WebLogic authentication provider

    • Entity Framework Code first: how to map a boolean type

      Hello

      in our database, they use number (1.0) to store Boolean values. Unfortunately I can not this maps to a bool in my EDM. It does not work:

      Property (x = > x.IsPoBox). HasColumnType ('number');

      or:

      Property (x = > x.IsPoBox). HasColumnType ("number (1,0) ');


      I'm sure the architects of Oracle did think about how store Boolean values in databases. Can someone enlighten me please?

      Concerning
      daProgramma

      You have not, Code first no is not supported by ODP.net. For DB first or the first model, the entrance of config file to make it looks like this:





    • How to create a table of tree using a hash map

      Hi, let's say that I have given, I have a hash map as below

      HashMap < String, arraylist < String > > data = new HashMap < String, arraylist < String > > ();


      How to recover the data on the user interface of the page using the tree map

      view shud be somethug as
      APAC
      EUROPEAN UNION
      USA
      if I click on APAC it shud show me the list of countries in APAC, even for remaiing.

      can someone help me please in this requirement with a code example

      Thank you very much

      Hello

      you create a tree model, not a hash table. Take a look at this: http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.html. If you have a hashMap then this will show you how to convert it to a template which can be used with a map of the tree

      Frank

    • Problem with the Entity Framework by using stored procedures

      I am developing a project with Oracle DB and Entity Framework.
      Due to performance issues, for some querys I uses procedures stored instead of LINQ queryies,
      When I try to add my model EF procedure, the procedure is added but the Model Designer
      It does not acknowledge the columns returned by the procedure.
      so I can't create something complex to the user the results of the procedure
      in a domain service

      Here's the relevant readme which has some tips: http://www.oracle.com/technetwork/topics/dotnet/tech-info/default-338300.html#mozTocId610465

      If you do a forum search there is further discussion of the issues, and the readme file provided with version beta has also some information.

      But I agree with the general theme: using stored procedures in the EF is a PITA. :( I really hope they do something to make it easier in the future because this is probably the single most important weakness in the implementation of Oracle EF and establishment of a complex type is your time and picky it's ridiculous. (I found it less problematic if your procedure returns a complete picture that your model has already an entity for, because you can get away with only add the entry to one of the configurations for the cursor rather than one for each column.)

      Even an external tool where direct you to the procedure and it creates the configuration entries to be able to copy and paste would be a huge improvement.

    • Export data from the database Table in the CSV file with OWB mapping

      Hello

      is it possible to export data from a database table in a CSV with an owb mapping. I think that it should be possible, but I didn't yet. Then someone can give me some tips how to handle this? Someone has a good article on the internet or a book where such a problem is described.

      Thank you

      Greetings Daniel

      Hi Daniel,.

      But how do I set the variable data file names in the mapping?

      Look at this article on blog OWB
      http://blogs.Oracle.com/warehousebuilder/2007/07/dynamically_generating_target.html

      Kind regards
      Oleg

    • TPT entity framework does not--&gt; showstopper

      Greetings,

      I am facing a similar problem that is described here:

      [EF and legacy - EF Possible bug?: http://stackoverflow.com/questions/11506683/entity-framework-and-inheritance-possible-bug-in-ef.]

      I use:

      Windows 7 64 bit
      ODAC 11.2 Release 5 32 bit
      Oracle 11.2 Express on localhost
      Visual Studio 2012
      Framework of the entity 5.0
      .NET 4.5

      Create a simple database with TPT inheritance:


      CREATE TABLE person)
      ID NOT NULL, NUMBER (38, 0)
      Name VARCHAR2 (50).
      PK100 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      CREATE TABLE Employee)
      ID NOT NULL, NUMBER (38, 0)
      JobTitle VARCHAR2 (50).
      PK101 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      ALTER TABLE Employees ADD CONSTRAINT ref_Employee_person
      FOREIGN KEY (Id)
      REFERENCE Person (Id)
      ;
      CREATE TABLE Superhero)
      ID NOT NULL, NUMBER (38, 0)
      Superpower VARCHAR2 (50).
      PK102 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      ALTER TABLE ADD CONSTRAINT of superhero ref_Superhero_person
      FOREIGN KEY (Id)
      REFERENCE Person (Id)
      ;
      -Sequence
      CREATE SEQUENCE seq_id
      INCREMENT BY 1
      START BY 55
      MINVALUE 1
      MAXVALUE 9999999999999999999999999999
      NOCYCLE
      ALL
      CACHE 20
      /
      CREATE OR REPLACE TRIGGER PERSON_BI BEFORE INSERT ONE PERSON FOR EACH LINE
      BEGIN IF: NEW.ID IS NULL, THEN SELECT SEQ_ID. NEXTVAL INTO: DOUBLE NEW.ID; END IF; END;
      /

      Create a console application, add an edmx file, set up heritage as follows:

      Diagram

      And I put the Id property of the Person as StoreGeneratedPattern entity identity

      Next, I created the following program:


      public static void Main (string [] args)
      {
      Employee
      var db = new Entities();
      EMPLOYEE e = new EMPLOYEE() {ID = 0, JOBTITLE = 'Programmer'};
      e.NAME = 'John Doe regular';
      DB. People.Add (e);
      Superhero
      Superhero s = new SUPERHERO();
      s.NAME = "Superman";
      s.SUPERPOWER = "flight."
      DB. People.Add (s);
      DB. SaveChanges();

      Search all people and look at the guy
      This is where I get an error:
      var allPeople DB. People.ToList ();

      allPeople.ForEach (x = > Console.WriteLine ("type:" + x.GetType ()));

      }

      This will raise the following error when I extract in allPeople:


      All objects of the 'Entities.People' EntitySet must have unique primary keys. However, an instance of the type "TestingTPTInheritance.EMPLOYEE" and an instance of type 'TestingTPTInheritance.SUPERHERO', both have the same primary key value, ' EntitySet = people. ID = 38'.


      Looking at the database, everything seems fine

      -Table of the person-
      ID NAME
      39 regular John Doe
      40 superman

      -Employee table-
      ID JOBTITLE
      Programmer 39

      -Table of superheroes-
      SUPERPOWER ID
      Flight 40

      If I select it that EF generates in "db. People.ToList (); "and run I get the following result:

      C1 C2 C3 C4 NAME
      0X0X 40 Superman
      0X0X 39 John Doe regular programmer

      Is this a bug in ODAC. If even there is a work around or will there be a fix soon?

      Published by: Amplus on 7.11.2012 07:59

      Given our generated queries are slightly different (for example CASTs on the ID column and the order of the columns in the SELECT list).
      the result of the query should be logically even.
      I ran the query generated from you on my 11.1 database, and the result is below.

      C1 C2 C3 C4 NAME
      0X1X Superman flight 66
      0X0X 65 John Doe regular programmer

      You see the 'theft' is not absent from the line of "Superman."

      If you run the generated query me on your database Oracle Express 11.2 and 'Theft' is still missing, then we
      don't know there is difference between the two databases that we use.
      The error that you got may be linked to this difference. You can confirm by trying with other Oracle database
      other than an Express database.
      Be sure to replace "SCOTT" with "TRP" in the generated query me.

    • Is it possible to combine Entity Framework 6 with ODAC 11 g within Visual Studio 2015?

      The .NET application, I want to develop will be deployed on a server with the customer Oracle 11 g used to access a back-end 10g database.  I would use the possible latest technologies which can still fulfil this obligation.

      Is it possible, therefore, to combine Entity Framework 6 with ODAC 11 g (or develop using 12 c, but deploy to an application server running 11 g)?  Should I strictly use ODP.Net Oracle libraries to do this?  I'm hoping to use Visual Studio 2015 (about to be released).

      If this is not possible, what are my options?

      Only ODP.NET 12.1.0.2 in ODAC 12 c R3 and higher is certified with EF 6. You must use a client of 12 c. However, you can still access a 10.2 this customer DB server.

    Maybe you are looking for