Esempio n. 1
0
 internal static void ExecuteSql2(string Statement)
 {
     rs2 = new ADORecordSetHelper("");
     rs2.Open(Statement, CurrentConnection, LockTypeEnum.adLockPessimistic);
 }
Esempio n. 2
0
 /// <summary>
 /// Returns a new recordset according to the compound statement on the current recordset
 /// </summary>
 /// <returns>A new open recordset</returns>
 public ADORecordSetHelper NextRecordSet()
 {
     ADORecordSetHelper result = null;
     if (commands.Count > 0)
     {
         result = new ADORecordSetHelper();
         result.ProviderFactory = ProviderFactory;
         result.DatabaseType = DatabaseType;
         result.Open(commands.Dequeue());
         result.commands = commands;
     }
     return result;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new ADORecordsetHelper using the provided parameters.
 /// </summary>
 /// <param name="SQLstr">The string containing the SQL query to be loaded into this ADORecodsetHelper object.</param>
 /// <param name="connection">Connection object to be use by this ADORecordsetHelper.</param>
 /// <param name="recordsAffected">Out parameter indicating the amount of records affected by the execution of the “SQLstr” query.</param>
 /// <param name="factoryName">The name of the factory to by use by this ADORecordsetHelper object (the name most exist on the configuration xml file).</param>
 /// <returns>The new ADORecordsetHelper object.</returns>
 public static ADORecordSetHelper Open(String SQLstr, DbConnection connection, out long recordsAffected, String factoryName)
 {
     ADORecordSetHelper result = new ADORecordSetHelper(factoryName);
     result.Open(SQLstr, connection);
     recordsAffected = result.RecordCount;
     return result;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new ADORecordsetHelper using the provided parameters.
 /// </summary>
 /// <param name="command"></param>
 /// <param name="recordsAffected"></param>
 /// <param name="factoryName"></param>
 /// <returns></returns>
 public static ADORecordSetHelper Open(DbCommand command, out long recordsAffected, string factoryName)
 {
     ADORecordSetHelper recordSet = new ADORecordSetHelper(factoryName);
     recordSet.Open(command);
     recordsAffected = recordSet.RecordCount;
     return recordSet;
 }
Esempio n. 5
0
 /// <summary>
 /// This method clones the recordset instance
 /// </summary>
 /// <param name="lockType">The lock type to be used by the cloned recorset</param>
 /// <returns>The cloned recordset</returns>
 public ADORecordSetHelper Clone(LockTypeEnum lockType)
 {
     ADORecordSetHelper result = new ADORecordSetHelper();
     result.DatabaseType = DatabaseType;
     result.ProviderFactory = ProviderFactory;
     result.opened = true;
     result.isClone = true;
     result.LockType = lockType;
     result.ActiveConnection = ActiveConnection;
     result.activeCommand = activeCommand;
     result.currentView = new DataView(Tables[0]);
     result.State = State;
     result.CursorLocation = CursorLocation;
     if (FieldChangeComplete != null)
     {
         result.FieldChangeComplete = FieldChangeComplete;
     }
     if (RecordChangeComplete != null)
     {
         result.RecordChangeComplete = RecordChangeComplete;
     }
     if (WillChangeField != null)
     {
         result.WillChangeField = WillChangeField;
     }
     if (WillChangeRecord != null)
     {
         result.WillChangeRecord = WillChangeRecord;
     }
     if (result.currentView.Count > 0)
     {
         result.index = 0;
         result.eof = false;
     }
     return result;
 }