Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Oracle Stored Procedures

Status
Not open for further replies.

ccampbell

Programmer
Aug 16, 2001
201
US
Does anyone have any code samples that they are willing to share that successfully launches Oracle stored procedures? Here is what I have so far

try
{
string connStr = "Data Source=" + dbServer + ";USER ID=" + dbUser + ";Password=" + dbPass + ";Pooling=False;";
//"User ID=" + dbUser + ";password = " + dbPass + ";server= " + dbServer + ";Initial Catalog=" + dbName + ";Pooling=False";
OracleConnection oracle = new OracleConnection(connStr);
OracleCommand oracleCmd;

oracle.Open();
oracleCmd = new OracleCommand("add_seq_numbers",oracle);
oracleCmd.CommandType = CommandType.StoredProcedure;
oracleCmd.ExecuteNonQuery();
.
.
.
oracle.Dispose();
}
catch (System.Security.SecurityException ex)
{
// Let the user know the save failed.
writeToLogFile(ex + "Permission to the CVIEW database was denied!");
m_streamWriter.Flush();
m_streamWriter.Close();
fs.Close();
error = true;
}
catch (System.Exception ex)
{
// React to other exceptions here.
writeToLogFile("Error " + ex.ToString());
m_streamWriter.Flush();
m_streamWriter.Close();
fs.Close();
error = true;
}

But this does not seem to work on an Oracle system.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top