Home All Groups Group Topic Archive Search About

Returning Cursors using Enterprise Library 2006

Author
30 Jan 2007 4:14 PM
manika02
Hi,
I am using Enterprise Library Jan 2006 to talk to Oracle. I have created a
very Simple package with a stored procedure that returns a cursor but I get
an error:

ORA-06550: wrong number or types of arguments in call to 'PR_GETEVENTS'
ORA-06550:

My Oracle Version is Oracle 8i and I am using Microsoft Oracle Client. I
tried adding an AddOutParameter for the cursor but it gives me the same error.

PACKAGE
----------

PROCEDURE PR_GETEVENTS(io_cursor IN OUT t_cursor)
   IS
         v_cursor t_cursor;
       BEGIN
       OPEN v_cursor FOR
       SELECT
            TIMESTAMP# as TIMESTAMP,
            USERID,
            TERMINAL,
            ACTION# AS ACTION_NUM
       FROM
            DBEVENTS;
   END;
END;

C# Code
-----------------------------

  public int GetEvents(dsEvents EventDS)
        {
   Database DBInstance =
DatabaseFactory.CreateDatabase(DatabaseName.DBname.ToString());
            string sqlCommand = "CURSPKG_EVENTS.pr_GetEvents";
            string tableName = "Events";
            int returnValue = ConstVals.NO_ERROR;

                try
            {
        DbCommand dbCommand = DBInstance.GetSqlStringCommand(sqlCommand);
        dbCommand.CommandType = CommandType.StoredProcedure;
                // Load output into dataset
DBInstance.LoadDataSet(dbCommand, EventDS,
Convert.ToString(EventDS.Events));  //this LoadDataSet line gives the
Ora-06550 error

                // Clean up
                dbCommand.Dispose();


            }


catch (code)
{

}
returnvalue

AddThis Social Bookmark Button