system.data.oracleclient

ORA-12571: TNS:packet writer failure with ASP.NET

旧城冷巷雨未停 提交于 2019-12-04 03:29:59
My development team is experiencing numerous ORA-12571: TNS:packet writer failure errors using ASP.NET 3.5 and 4.0 against Oracle 11g. These errors are inconsistent as to when they occur, and are generated by numerous applications. This exception happens while calling random stored procedures, packets, and inline SQL statements. The Oracle 11 client is installed on the web server. Some applications use Microsoft System.Data.OracleClient to connect to Oracle, and some use the .NET components provided by oracle (ODP.NET). Both data access objects come up with the same error. There are other non

Constructing a good search query using system.data.oracleclient

懵懂的女人 提交于 2019-12-01 12:06:50
I am constructing a search function in a class to be used by several of our asp pages. The idea is simple, take a search term from the user and query the database for the item. Currently I am doing this the wrong way, which is vulnerable to SQL injection attacks (and ELMAH is in there to save the day if something goes wrong): Public Shared Function SearchByName(ByVal searchterm As String) As DataTable SearchByName = New DataTable Dim con As New OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings("OracleDB").ConnectionString) Try con.Open() Dim SqlStr As String =

Constructing a good search query using system.data.oracleclient

让人想犯罪 __ 提交于 2019-12-01 10:02:50
问题 I am constructing a search function in a class to be used by several of our asp pages. The idea is simple, take a search term from the user and query the database for the item. Currently I am doing this the wrong way, which is vulnerable to SQL injection attacks (and ELMAH is in there to save the day if something goes wrong): Public Shared Function SearchByName(ByVal searchterm As String) As DataTable SearchByName = New DataTable Dim con As New OracleConnection(System.Configuration

Is there a way to force OracleCommand.BindByName to be true by default for ODP.NET?

荒凉一梦 提交于 2019-12-01 04:52:23
Since the System.Data.OracleClient library has been deprecated , we are in the process of migrating our code base to use Oracle Data Provider for .NET (ODP.NET) instead. One of the issues that we have encountered is that the System.Data.OracleClient uses parameter name binding as opposed to binding by position and all of the code directly access the System.Data.OracleClient.OracleCommand as opposed to using an intermediate data layer. Since there is quite a bit of code, is there an easy way to force the ODP.NET OracleCommand.BindByName to be true by default, or must we go through and set the

Is there a way to force OracleCommand.BindByName to be true by default for ODP.NET?

只谈情不闲聊 提交于 2019-12-01 02:36:09
问题 Since the System.Data.OracleClient library has been deprecated, we are in the process of migrating our code base to use Oracle Data Provider for .NET (ODP.NET) instead. One of the issues that we have encountered is that the System.Data.OracleClient uses parameter name binding as opposed to binding by position and all of the code directly access the System.Data.OracleClient.OracleCommand as opposed to using an intermediate data layer. Since there is quite a bit of code, is there an easy way to

Issue with System.Data.OracleClient and ODP.Net 11g together used in .net 2.0 web site

允我心安 提交于 2019-11-29 17:08:40
In our .net framework 2.0 based application we were using System.Data.Oracleclient and now migrating to ODP.Net, the volume of the project is too high, so we cannot do the entire migration on one go, as a result the application is using 2 providers System.Data.Oracleclient & ODP.Net as of now. Now we are changing our OS, from Windows xp 32bit to Windows 7 64bit. While doing so we observed the following, 1) A query executes in < 1 sec using System.Data.Oracleclient & ODP.Net 10g 64bit (Oracle.DataAccess.dll version 2.102.2.20). and the same query executes in < 1 sec on Oracle SQL Developer v1.5

Issues calling stored procedure from C# with large CLOB

痞子三分冷 提交于 2019-11-28 08:19:43
I'm not the first to have these issues, and will list some reference posts below, but am still looking for a proper solution. I need to call a stored procedure (Oracle 10g database) from a C# web service. The web server has an Oracle 9i client installed and I am using Microsofts System.Data.OracleClient . The procedure takes an XML as a CLOB. When the XML was over 4000 Bytes (which is likely in a normal use case), I stumbled over the following error: ORA-01460 - unimplemented or unreasonable conversion requested I've found this , this and this post. Further I found a promising workaround which

ORA-00911: invalid character

跟風遠走 提交于 2019-11-27 12:59:04
I create two table in my oracle (11g) database like this: create table "test" ("id" int); create table test ("id" int); Then in my C# program there is a problem : OracleConnection conn = new OracleConnection(-myConnectionString-); conn.Open(); OracleCommand command = new OracleCommand("select * from test;", conn); var v = command.ExecuteReader(); OracleCommand command = new OracleCommand("select * from \"test\";", conn); var v = command.ExecuteReader(); for both command.ExecuteReader() I have an "ORA-00911: invalid character" error. Remove ; (semi-colon) from the end of SQL string In case

Issues calling stored procedure from C# with large CLOB

不打扰是莪最后的温柔 提交于 2019-11-27 02:14:49
问题 I'm not the first to have these issues, and will list some reference posts below, but am still looking for a proper solution. I need to call a stored procedure (Oracle 10g database) from a C# web service. The web server has an Oracle 9i client installed and I am using Microsofts System.Data.OracleClient . The procedure takes an XML as a CLOB. When the XML was over 4000 Bytes (which is likely in a normal use case), I stumbled over the following error: ORA-01460 - unimplemented or unreasonable

OracleCommand SQL Parameters Binding

夙愿已清 提交于 2019-11-26 14:40:28
I have a problem with the binding of the below parameter. The connection works because I had tested it without using parameters. However, the value of the query before being executed is still using '@userName' instead of 'jsmith' for example. What is the problem? Is this not the right way to go around binding? public static String GetFullName(String domainUser) { DataTable dT; String fullName = ""; OracleConnection db = DatabaseAdapter.GetConn(); db.Open(); OracleCommand oraCommand = new OracleCommand("SELECT fullname FROM user_profile WHERE domain_user_name = '@userName'", db); oraCommand