L
Lucas Sain
Hi,
I have a method that loads a ArrayList with SQL statements that where
created by this same mehtod, These can be INSERTS, DELETES, UPDATES. Then it
calls the BLL which has a simle swicth and a call to the DAL:
case DBType.Oracle:
{
foreach(string constructedClause in storedConstructedClauses) //this is
the array
{
oracleDAL.TableMaintenance(constructedClause.Trim());
}
break;
}
......
Fore each row it finds in the ArrayList it calles:
try
{
OracleConnection oracleConnection = new OracleConnection(
ConnectionString );
OracleCommand com = new OracleCommand(constructedClause,
oracleConnection);
com.CommandType = CommandType.Text;
ExecuteNonQueryAndClose(oracleConnection,com);
}
catch( Exception ex)
{
throw new LidersoftDataAccessException(ex.Message);
}
This works great but how can I (if possible) send Just one string with ALL
the statemnts in the array list to the DB SERVER in this case ORACLE.. I
tried this but kept getting an oracle error, first I got the error
"statement not ended correctly..." becasue I was not putting the ";" at the
end of each SQL statement so I added them and then GOT err5or "0911",
illegal character.... SO.... can this be done... how so....
Regards
Lucas
I have a method that loads a ArrayList with SQL statements that where
created by this same mehtod, These can be INSERTS, DELETES, UPDATES. Then it
calls the BLL which has a simle swicth and a call to the DAL:
case DBType.Oracle:
{
foreach(string constructedClause in storedConstructedClauses) //this is
the array
{
oracleDAL.TableMaintenance(constructedClause.Trim());
}
break;
}
......
Fore each row it finds in the ArrayList it calles:
try
{
OracleConnection oracleConnection = new OracleConnection(
ConnectionString );
OracleCommand com = new OracleCommand(constructedClause,
oracleConnection);
com.CommandType = CommandType.Text;
ExecuteNonQueryAndClose(oracleConnection,com);
}
catch( Exception ex)
{
throw new LidersoftDataAccessException(ex.Message);
}
This works great but how can I (if possible) send Just one string with ALL
the statemnts in the array list to the DB SERVER in this case ORACLE.. I
tried this but kept getting an oracle error, first I got the error
"statement not ended correctly..." becasue I was not putting the ";" at the
end of each SQL statement so I added them and then GOT err5or "0911",
illegal character.... SO.... can this be done... how so....
Regards
Lucas