I am using OraDirect for .NET 2.0 version 4.60.33 and want to call Oracle with two statements in one call. The following is the code snippet:
try {
ArrayList sqlParams = BuildParameters();
using (OracleConnection conn = new OracleConnection(connectionString))
{
CommandType commandType = CommandType.Text;
OracleParameter[] parameters = (OracleParameter[])sqlParams.ToArray(typeof(OracleParameter));
OracleHelper.ExecuteDataset(conn,
commandType,
operation,
parameters);
}
catch (OracleException oex)
{
}
In the above code, I would like to pass two statements in operation string, something like the following:
Set role read_all_role;
select * from apc_ar_customers;
However this did not work and returned syntax error. Please help.
Thanks.
OraDirect for .NET2 sending multiple statements in one call
Would the following command text work?
BEGIN
Set role read_all_role;
select * from apc_ar_customers;
END
Could you show me an example where using OracleScript so that we can specify Oracle command as Text to work with multiple statements? I am having problem with my Oracle environment and working on it to get it resolve so I cannot myself verify at the moment.
Thanks.
BEGIN
Set role read_all_role;
select * from apc_ar_customers;
END
Could you show me an example where using OracleScript so that we can specify Oracle command as Text to work with multiple statements? I am having problem with my Oracle environment and working on it to get it resolve so I cannot myself verify at the moment.
Thanks.