Tag Archives: oracle

How can i get query from preparedStatement in oracle with values assigned using setObject

Questions: I am trying to get the query from a PreparedStatement with the following code: query = ((oracle.jdbc.driver.OraclePreparedStatement) preparedStatement).getOriginalSql(); but I am getting a query like this “INSERT INTO nantest (ID,NAME,AGE,DOB) VALUES(IMEI_SEGMENT_SEQ.nextval,?,?,TO_DATE(?,’dd-MM-yyyy’))” i.e. instead of values I am getting ?. Is there any way I can get the query with values? Answers:

SimpleDateFormat for Oracle Date (TimeStamp with TimeZone)

Questions: I am currently trying to parse a Datestring (TimeStamp with TimeZone) coming from an Oracle Database using a SimpleDateFormat. This is mandatory as the resulting Pattern is supposed to be used in Splunks DBConnect. The String I recieve has the format: 2018-07-24 14:00:02.876611 +0:00 I am currently trying to use yyyy-MM-dd HH:mm:ss.S XXX as… Read More »

Connect to oracle .net core

Questions: I have the following code: OracleConnection conn = new OracleConnection(); conn.ConnectionString = test; conn.Open(); When I run this, I get the following error: Could not load file or assembly ‘System.Configuration.ConfigurationManager, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified. Why in the earth do It need to load System.Configuration.ConfigurationManger? Answers:

Execute Oracle SQL Scripts with C#

Questions: I am working on a big solution in C#. This solution uses different oracle databases and is checked in in TFS. Actually I develop a small library which can deploy the SQL Scripts in the solution to the used databases. The deployment of the application is handled with TFS and in the future my… Read More »

Entity Framework with Oracle command Add-Migration creates in the table key field of the decimal type, but in the template is integer

Questions: Because when I run Add-Migration Test -Force command, it generates the create table in the table it places as decimal, whereas in the model it is int “id_usuario = c.Decimal(nullable: false, precision: 10, scale: 0, identity: true),” public partial class Teste : DbMigration { public override void Up() { CreateTable( “dbo.sec_usuarios”, c => new… Read More »

Oracle.ManagedDataAccess.Client error

Questions: Severity Code Description Project File Line Suppression State Error Error 175: The ADO.NET provider with invariant name ‘Oracle.ManagedDataAccess.Client’ is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details. Answers:

The provider is not compatible with the version of Oracle client (Oracle.DataAccess.Client.OracleConnection threw an exception.)

Questions: My work environment is 1. VS 2012 2. Oracle 11 3. Oracle 12 installed in C and D drives. at oracleConnection step i’m getting The type initializer for ‘Oracle.DataAccess.Client.OracleConnection’ threw an exception. and i added path in Environment variables like D:\app\product\11.2.0\client_1\bin and we are using tnsnames Answers: