Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Adding New Entity in Oracle database
Versions des environnements
Could you please help me with this issue?
I have a problem while inserting a new record in oracle database, but it works fine while inserting the same in SQL database.
I have used business layer generator wizard to create Business objects, Entities, Dataaccess and Rules classes for the table named Client_Master
But while trying to insert a record
When I call
ClientMasterEntity ODEntity = clientMaster.NewEntity();
Which in turn calls the method CreateSelectCommand()
public override System.Data.IDbCommand CreateSelectCommand()
{
System.Data.OracleClient.OracleCommand SelectCommand = (System.Data.OracleClient.OracleCommand)this.CreateCommand
("WORLDKING.MMNET_CLIENT_MASTER_GEN.CLIENT_MASTERSelect");
SelectCommand.CommandType = System.Data.CommandType.StoredProcedure;
SelectCommand.Parameters.AddRange(new System.Data.OracleClient.OracleParameter[] {
new System.Data.OracleClient.OracleParameter("P_RC", System.Data.OracleClient.OracleType.Cursor, 0,
System.Data.ParameterDirection.Output, true, ((byte)(0)), ((byte)(0)), "", System.Data.DataRowVersion.Current, null)});
return SelectCommand;
}
And then calls CreateDataAdapter()
public override System.Data.IDataAdapter CreateDataAdapter()
{
return this.DataAdapter;
}
Which raises an exception
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'CLIENT_MASTERSELECT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The business layer generator created the SQL as follows for CLIENT_MASTERSelect Procedure
PROCEDURE CLIENT_MASTERSelect
(
P_RC OUT SYS_REFCURSOR
)
IS
BEGIN
OPEN P_RC FOR
SELECT NAME , SHORT_NAME
FROM CLIENT_MASTER ;
END CLIENT_MASTERSelect;
Please let me know, if I am missing something here?
Thanks & Kind Regards,
Vidya
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement