Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSDAORA vs OraOLEDB.Oracle

863 views
Skip to first unread message

R Shankar

unread,
Jun 7, 2002, 11:04:11 PM6/7/02
to
Can somebody tell me what are the differences of using the
MSDAORA OLEDB driver against the OraOLEDB.Oracle Driver.

The following program is working properly. But if I change
the connection string to OraOLEDB.Oracle instead of
MSDAORA I am getting the Oracle Error "Undeclared
Identified PEMPNO". The code runs properly with "MSDAORA".

Please Help.

Regards,
Ravi.

C# Code
-----------
//Throws an Error
//Change to MSDAORA
OleDbConnection conn = new OleDbConnection
("Provider=OraOLEDB.Oracle;Data Source=vravish;User
ID=scott;Password=tiger");

OleDbCommand cmd = new OleDbCommand("{call
TESTPKG.allEmployees({resultset 100, PEMPNO,
PENAME})}",conn);

OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);

DataSet ds = new DataSet();

conn.Open();
adapter.Fill(ds,"EMP");
foreach(DataRow row in ds.Tables["EMP"].Rows)
Console.WriteLine(row[1]);
conn.Close();

Oracle Package Code
--------------------
PACKAGE TESTPKG
AS
TYPE tEMPNO IS TABLE OF NUMBER(4)
INDEX BY BINARY_INTEGER;
TYPE tENAME IS TABLE OF VARCHAR(10)
INDEX BY BINARY_INTEGER;

PROCEDURE allEmployees(PEMPNO OUT tEMPNO,
PENAME OUT
tENAME);

END TESTPKG;

PACKAGE BODY TESTPKG
AS
PROCEDURE allEmployees(PEMPNO OUT tEMPNO,
PENAME
OUT tENAME)

IS

CURSOR EMPS IS
SELECT EMPNO,ENAME FROM EMP;
percount NUMBER DEFAULT 1;

BEGIN
FOR EMP IN EMPS
LOOP
PEMPNO(percount) := EMP.EMPNO;
PENAME(percount) := EMP.ENAME;
percount := percount + 1;
END LOOP;
END;
END;

Alexander Guppy

unread,
Jun 13, 2002, 5:58:35 AM6/13/02
to
I think that OraOLEDB does not support the same escape sequence that
MSDAORA does. I have the same problem as I am trying to use Oracle 9i
and MSDAORA - they seem to be incompatable. I have been trying to use
ORAOLEDB with ADO.NET and server cursors which also seems to be
incompatable.


This might help.
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/win.920/a95498/toc.htm

http://otn.oracle.com/tech/windows/ole_db/content.html


Have a look for
"R Shankar" <ravi_sh...@yahoo.com> wrote in message news:<a4ef01c20e99$2a048680$95e62ecf@tkmsftngxs02>...

0 new messages