Home All Groups Group Topic Archive Search About

Microsoft enterprise library and Oracle

Author
3 Oct 2005 2:54 PM
ilyas
I have the following code

                Database db=DatabaseFactory.CreateDatabase();
                DBCommandWrapper dbCmd=db.GetStoredProcCommandWrapper("test1");
                dbCmd.AddInParameter("modUsr", DbType.String, "QUINNJ");
                dbCmd.AddOutParameter("CUR", DbType.Object, 2000);
                DataSet result= db.ExecuteDataSet(dbCmd);
                MessageBox.Show(result.GetXml());


However when this gets executed, the error " identifier 'TEST1' must be
declared" gets displayed?

What am I doing wrong here?

Tes1 is the name of a stored procedure....

Author
20 Oct 2005 12:36 PM
DSISupport
My guess that your stored procedure has to be created inside an Oracle
package and you call it this way:
dbCmd=db.GetStoredProcCommandWrapper("package1.test1");
assuming your package name is package1

You can also have a stored procedure without a package but you have to grant
access to the user that is used in your DAAB configuration in order for this
user to be able to call the stored procedure.


Show quote
"il***@igsoftwaresolutions.co.uk" wrote:

> I have the following code
>
>                 Database db=DatabaseFactory.CreateDatabase();
>                 DBCommandWrapper dbCmd=db.GetStoredProcCommandWrapper("test1");
>                 dbCmd.AddInParameter("modUsr", DbType.String, "QUINNJ");
>                 dbCmd.AddOutParameter("CUR", DbType.Object, 2000);
>                 DataSet result= db.ExecuteDataSet(dbCmd);
>                 MessageBox.Show(result.GetXml());
>
>
> However when this gets executed, the error " identifier 'TEST1' must be
> declared" gets displayed?
>
> What am I doing wrong here?
>
> Tes1 is the name of a stored procedure....
>
>

AddThis Social Bookmark Button