Using system; // Reference System Namespace Using System.Data.OLDB; // Reference ADO.NET Name Space Using System.Data; // Reference Data Space Using System.Runtime.InterOpServices; // In order to call Guidusing System.EnterpriseServices; // Reference COM Mission Space Using System.Runtime.CompilerServices; // Runtime Compile Server Using System.Reflection; // Use some global attributes Using System.Data.sqlcl CLIT; [Assembly] ("Comlibly: ApplicationName) ] // Strong name file name and file properties. Sn.exe generated by usage sn -k clsStock.snk // [assembly: AssemblyKeyFileAttribute ( "clsStock.snk")] // [assembly: AssemblyKeyName ( "clsStock.snk")] [assembly: AssemblyKeyFileAttribute ( "../ / Hystock.snk")][assembly: assemblyKeyname ("..//// Clsstock.snk")] Namespace Comlibrary {[Transaction (TransactionOption.Required) public class dboperty: servicedcomponent {
Private SqlConnection myconnection; private sqlcommand mycommand;
///
MyCommand = new sqlcommand (); mycommand.connection = myconnection;
///
Int returnvalue = 0;
Mycommand.commandtext = commandstring; returnvalue = mycommand.executenonquery (); return returnction;
}
///
Public void commit () {
Contextutil.setComplete ();
IF (MyConnection! = NULL) myconnection.close ();
}
///
Public void abort () {
Contextutil.Setabort ();
IF (MyConnection! = NULL) myconnection.close ();
}
}