Open GoogleCodeExporter opened 9 years ago
Hello,
You will need to include the OracleClient layer otherwise you will run into
issues like this. Why did you choose to exclude this layer?
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 10 Jun 2010 at 2:41
sorry,my english is so pool.
i mean ,when use code like this:
reader = Data.DataRepository.Provider.ExecuteReader("proc_Right_Operation_GetByUPId",User.UserId,ProgramID);
or
Data.DataRepository.Provider.ExecuteDataSet("proc_Right_Operation_GetByUPId",User.UserId,ProgramID);
it's error becourse there's a out cursur in proccdure
I FIX'T this like flow:
public override IDataReader ExecuteReader(string storedProcedureName, params
object[] parameterValues)
{
OracleDatabase database = new OracleDatabase(this._connectionString);
DbCommand command = database.GetStoredProcCommand(storedProcedureName);
DbCommand Precommand = database.GetStoredProcCommand(storedProcedureName);
Precommand.Connection = database.CreateConnection();
Precommand.Connection.Open();
OracleCommandBuilder.DeriveParameters((OracleCommand)Precommand);
for (int i = 0; i < parameterValues.Length; i++)
{
database.AddInParameter(command,Precommand.Parameters[i].ParameterName,Precommand.Parameters[i].DbType,parameterValues[i]);
}
return database.ExecuteReader(command);
}
Original comment by huangqiu...@gmail.com
on 11 Jun 2010 at 2:24
[deleted comment]
Hello,
Can you try to reproduce this with the latest nightly build of the templates.
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 15 Jun 2010 at 1:23
Original issue reported on code.google.com by
huangqiu...@gmail.com
on 10 Jun 2010 at 12:11