Rishi wrote:
Sorry, but i am not following you, can you explain me in detail how i can achieve this?
Mmm. I mean that you can create wrapper methods to make the SP calls consistence between SQLServer and Oracle. But that depends on where you are getting the error:
Rishi wrote:
I have store procedure defined as out parameter (Ref Cursor) in oracle and which is not defined in sql. So there is different number of parameters in sql and oracle.
So i am getting error because of different number of parameters in oracle and sql server database. Please guide me how to handle this kind of situation.
You said you are getting errors. What errors and where?
A typical RetrievalProcedure with ref_cursor looks like this in the generated code:
public static DataTable GetUserCompanies(System.String psUserName)
{
using(DataAccessAdapter dataAccessProvider = new DataAccessAdapter())
{
return FcnGetUserCompanies(psUserName, dataAccessProvider);
}
}
public static DataTable FcnGetUserCompanies(System.String psUserName, IDataAccessCore dataAccessProvider)
{
using(StoredProcedureCall call = CreateFcnGetUserCompaniesCall(dataAccessProvider, psUserName))
{
DataTable toReturn = call.FillDataTable();
return toReturn;
}
}
... which should look very similar using SQLServer. So, where do you have those errors?