Several call storage procedure examples

xiaoxiao2021-03-06  106

OmTransactionManager.SetConnectionAndTransaction (myCMD); myCMD.CommandText = "{call curspkg_join.open_join_cursor1 (?, {resultset 0, io_cursor})}"; myCMD.Parameters.Add ( "ID", OleDbType.Numeric, 4) .Value = 0 OLEDBDATAREADER MyReader; MyReader = mycmd.executeReader (); INT X; INT i = 0;

While (MyReader.Read ()) {for (x = 0; x <= myreader.fieldcount - 1; x ) {scentity [i] = new gceedat00sciraientity (); SCENTINTITY [i] .Misename = myReader.getValue (x ) .Tostring (); SCENTITY [I] .Misecode = myreader.getValue (x ). ToString (); SCENTING () ;s.MINCOUNT = MyReader.getValue (x ). ToString (); SCENTITY [i] .success = myReader. GetValue (x ). Tostring ();

} I ;

MyReader.Close ();

public int EXECORASQL (GCEEDAT00CSData argCSData) {string constring = "Data Source = 'SE'; User ID = 'mhs'; Password = 'mhs'"; OracleConnection con = new OracleConnection (constring); con.Open (); oraexecsql = new OracleCommand ( "COUNT_CUSTOM", con); oraexecsql.CommandType = CommandType.StoredProcedure; oraexecsql.Parameters .Add ( "reccount", OracleType.Int16);. oraexecsql.Parameters [ "reccount"] Direction = ParameterDirection.Output; oraexecsql. EXECUTENONQUERY (); int result = convert.toint32 (ORAEXECSQL.Parameters ["Recount"]. Value.toString (); con. close (); return result;}

转载请注明原文地址:https://www.9cbs.com/read-104998.html

New Post(0)