odp.net

Oracle.DataAccess.Client.OracleCommand ExecuteReaderAsync

点点圈 提交于 2019-12-11 12:07:28
问题 So because the OracleCommand class extends the DbCommand class it implements the Async versions of it's Execute methods. However, I cannot find any reference to that OracleCommand class supporting these methods from Oracle (I am using 11g): http://docs.oracle.com/html/E10927_01/OracleCommandClass.htm Do anyone know what this is doing under the hood to support these methods? They appear to be non-blocking and support cancellation in usage (I expected a NotImplementedException to be honest),

Error ORA-01722 when updating a table using ODP.net

隐身守侯 提交于 2019-12-11 12:00:07
问题 I'm trying update a table that looks something like: column a VARCHAR2(80) Using the following function: sqlString = "UPDATE TABLE SET domicilio = :p_domicilio WHERE codigo = :p_codigo"; string sqlCommandtext = sqlString; using (var cn = new OracleConnection("DATA SOURCE=XXX...")) { cn.Open(); using (OracleCommand commandInt32 = cn.CreateCommand()) { cmd.CommandText = sqlCommandtext; cmd.Parameters.Add("p_codigo", OracleDbType.Int32, 34620, ParameterDirection.Input); cmd.Parameters.Add("p

Is connection pooling a must-have in ODP.NET?

不羁岁月 提交于 2019-12-11 09:38:49
问题 I am writing a nightly job to move data from SQL Server to Oracle using ODP.NET. We use around 100 connection objects(independent of data) and we don't expect more than 1500 rows to transfer in a single run(in total). The ODP.NET notes and materials I read never talk about keeping connection pooling off. In dev, I keep the connection pooling off and it just works fine. Is it advisable in the given scenario to keep the connection pooling off,(given all the connections are disposed properly

ODP.NET output String parameter does not return value

♀尐吖头ヾ 提交于 2019-12-11 08:32:43
问题 I was defining a string output parameter in the RETURNING clause of an INSERT statement using ODP.NET. I was not able to get any value returned. It worked fine for other DbTypes. 回答1: I tracked down the problem as being the following. Oracle seems to require the size parameter to be set for output string parameters to indicate the maximum size of the string to be retrieve. The default (0) causes the output value to be an empty string. 来源: https://stackoverflow.com/questions/27237622/odp-net

SET_NLS fails over Oracle ODP.net

帅比萌擦擦* 提交于 2019-12-11 08:05:53
问题 I try to execute the follwing statement from a c# program with ODP.NET: string sql = "BEGIN dbms_session.set_nls('NLS_NUMERIC_CHARACTERS','''.,'''); END;"; using (OracleConnection connection = new OracleConnection("Data Source=db;User Id=a;Password=b")) { connection.Open(); using (OracleCommand command = new OracleCommand(sql, connection)) { command.ExecuteNonQuery(); } connection.Close(); } I retrieve the follwing error message: ORA-02074: cannot SET NLS in a distributed transaction I don't

Output parameter for TABLE OF VARCHAR2 Oracle odp.net

こ雲淡風輕ζ 提交于 2019-12-11 07:25:09
问题 I have this type: TYPE tipo_TableVarchar2 IS TABLE OF VARCHAR2(1000) INDEX BY BINARY_INTEGER; and procedure get_array (p_arr out TableVarchar2 ) is ... OracleParameter param = new OracleParameter(); param.OracleDbType = OracleDbType.Varchar2; param.CollectionType = OracleCollectionType.PLSQLAssociativeArray; param.ParameterDirection = ParameterDirection.Output; cm.Parameters.Add(param); How to use OracleParameter 's output to get the value? 回答1: Look into the Oracle 11g odp.net drivers, which

ODP.NET Managed tnsnames.ora IFILE references

柔情痞子 提交于 2019-12-11 07:18:52
问题 Does Managed ODP.NET x64 12.1.0.2 tnsname.ora support using IFILE?? I cannot get it to work. For example, with the normal "thick client" unmanaged Oracle client that I have had installed for years, I used to have my tnsnames.ora file with one line in it: IFILE=C:\OracleDataSources\tnsnames.MAIN And then the C:\OracleDataSources\tnsnames.MAIN file contains IFILE references to config files that contain the actual data source definitions for each of the other Oracle instances within our

Query a stored procedure for it's parameter names and types

落花浮王杯 提交于 2019-12-11 06:46:26
问题 Is there any easy way to query a stored procedure (Oracle - PL/SQL) for what parameters it expects? I know that I can query USER_SOURCE to get the whole procedure but I'd then have to parse the whole procedure, and if the parameter is of type [table].[column]%TYPE I'd then have to query the table schema as well. Either using just sql or via ODP.Net. 回答1: The USER_ARGUMENTS view will give you the details. 回答2: Another method is to call DBMS_DESCRIBE.DESCRIBE_PROCEDURE. 来源: https:/

Can't connect to Oracle using Windows Authentication with ODP.NET

邮差的信 提交于 2019-12-11 05:51:00
问题 I've configured my Oracle Database for NTS Authentication and set my Windows Login up as a user in the database. I'm able to log in to the Database with the command sqlplus / . I'm also able to connect using Windows Authentication using the System.Data.OracleClient provider for ADO.NET. For example, the following code snippet works: DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OracleClient"); DbConnection connection = factory.CreateConnection(); connection

LDAP lookup using ODP.NET, Managed Driver Beta (Oracle.ManagedDataAccess.dll) fails in C# application

六眼飞鱼酱① 提交于 2019-12-11 04:37:11
问题 I'm using ODP.NET, Managed Driver Beta (Oracle.ManagedDataAccess.dll) in my C# application to access an Oracle database. This is to replace using the native version of ODP.NET in order to remove all the local dependencies on Oracle Client 10g/11g/etc. so that this needn't have to be installed locally. This is a solution I found here. This is my C# code: new OracleConnection("Data Source=ABCDEFG1;User Id=myuserid;Password=mypassword;").Open(); This line is reached and the OracleConnection