odp.net

ODP.NET ORA-12154 TNS error only when run as service

人走茶凉 提交于 2019-12-10 16:36:58
问题 I am writing a service in VB.NET to continually log data to an Oracle DB using ODP.NET The application was originally written as a basic Windows Forms App and works however when I port it to a service it seems it cannot see the TNS file and the following error message is thrown: Service cannot be started. Oracle.DataAccess.Client.OracleException ORA-12154:TNS:could not resolve the connect identifier specified So when using the following example connectstring "Data Source= example;User Id=

Could not load file or assembly 'Oracle.DataAccessVersion=9.2.0.700, Culture=neutral, PublicKeyToken=89b483f429c47342'

我与影子孤独终老i 提交于 2019-12-10 15:53:29
问题 Could not load file or assembly 'Oracle.DataAccess, Version=9.2.0.700, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) i have developed the application using odac 32 bit version 11.2.0.3.0. where it is working absolutely fine.But deploying into another pc where i installed IIS 7.5 with 32 bit client ersion 11.2.0.3.0 i am always getting the above

why I get OracleTruncateException with ODP.NET OracleDataAdapter but not with System.Data.OracleClient's adapter when DbDataAdapter.Update called?

六眼飞鱼酱① 提交于 2019-12-10 14:06:16
问题 I do the following: protected int CreateComponent(DbConnection cnctn, string tableName) { int newId; DbCommand selectCmd = _provFactory.CreateCommand(); selectCmd.Connection = cnctn; selectCmd.CommandText = string.Format( "SELECT * FROM {0} WHERE ID = (SELECT MAX(ID) FROM {0})", tableName); DbDataAdapter dataAdapter = _provFactory.CreateDataAdapter(); dataAdapter.SelectCommand = selectCmd; ... // create Insert/Update/Delete commands with a builder for the data adapter ... dataAdapter.Fill(

Some data changes in the database. How can I trigger some C# code doing some work upon these changes?

笑着哭i 提交于 2019-12-10 13:17:10
问题 Suppose I have some application A with a database. Now I want to add another application B, which should keep track of the database changes of application A. Application B should do some calculations, when data has changed. There is no direct communication between both applications. Both can only see the database. The basic problem is: Some data changes in the database. How can I trigger some C# code doing some work upon these changes? To give some stimulus for answers, I mention some

Getting output buffer from DBMS_OUTPUT.GET_LINES in C#

旧街凉风 提交于 2019-12-10 12:40:57
问题 I'm trying to get the output from the DBMS_OUTPUT.PUT_LINE() method in my anonymous PL/SQL block through C#. I've looked at a couple of other related questions here, but am still having trouble. The return code of executing the anonymous block is returning -1 , which should be correct based on the docs. I'm setting the DBMS_OUTPUT.ENABLE() to NULL in order to not set a specific buffer size, then using the DBMS_OUTPUT.GET_LINES() method in order to get the lines from that buffer. It returns

.NET Webservice using ODP.NET 64bit

谁都会走 提交于 2019-12-10 12:12:51
问题 I created a web service in .net4.0. It connects to an oracle-database by ODP.NET4. FYI I used ODAC112021Xcopy_X64 and installed odp4 and asp4. The service runs well in development environment. But after publishing it to IIS running on the same machine I get the following exception: System.ServiceModel.FaultException`1 was unhandled Message=Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The

ODP.NET UPDATE… RETURNING INTO… multiple rows, Parameter type

怎甘沉沦 提交于 2019-12-10 11:57:20
问题 i was wondering if the following scheme of action is possible: i am implementing a simple data entry application. each editable record resides in a table. the user has to edit multiple records at the same time (to reduce data entry time). what i try to do at the moment is to implement some sort of locking mechanism in the records. the first thing i thought of was to execute (ExecuteNonQuery) an UPDATE some_table SET status = 'locked' WHERE rownum = 1 RETURNING id INTO :locked_id with an

IIS6,IIS7发布mvc+oracle项目 (32位和64位)

天大地大妈咪最大 提交于 2019-12-10 11:29:40
配置需求 环境要求: 1、 Windows 2003 server + IIS6.0 2、 .net framework 4.0 3、 odp.net 所需文件下载 Microsoft .NET Framework 3.5 : http://www.microsoft.com/en-us/download/details.aspx?id=21 Microsoft .NET Framework 4.0 : http://www.microsoft.com/zh-cn/download/details.aspx?id=17718 Windows 图像处理组件(WIC) : http://www.microsoft.com/zh-cn/download/details.aspx?id=32 odp.net : 自己在oracle官网下 配置IIS6.0 1、首先安装IIS6.0 2、在安装.NET 3.5 (装.net 4.0的前提) 3、然后安装 WIC (反正就是需要) 4、安装.NET 4.0 (要连下网哈) 5、最后在装ODP.NET (就是oracle的链接库 ) 发布MVC程序 a.32位服务器运行32位mvc程序 第一步: 创建一个站点。 第二步:修改.NET版本 第三步: 添加MVC程序映射,注意红线圈住的地方。 5、 IIS管理器中,点击"Web服务扩展", 查看一下,

Connect to Oracle with odp.net and the OCI from C#

狂风中的少年 提交于 2019-12-10 11:25:31
问题 I have been reading about how to connect to my oracle database from my C# win application, but I keep “hitting the wall”. I have decided to use odp.net and OCI, such that the client computer not needs to install a client, but I can’t get it to work. I have a small test application, the code I shown below and in my solution I have added the following dll’s from oracle OCI: oci.dll, orannzsbb11.dll and oraociicus11.dll. They are all placed together with the final .exe file. Test Code: private

Returning cursor from PL/SQL anonymous block in C#

这一生的挚爱 提交于 2019-12-09 19:39:48
问题 I'm working on converting an existing application from SQL Server over to Oracle, and I've hit a roadblock. I'm trying to execute an anonymous block as dynamic SQL and return a result set. However nothing I've tried seems to be able to return any values. Stored procedures are out due to design constraints. My query is defined as: DECLARE type id_array IS TABLE OF number; t_Ids id_array; BEGIN UPDATE CSM_RECORDS SET MIGRATION_STATE = 1, LAST_UPDATE = CURRENT_DATE WHERE OBJECT_UID IN (SELECT