Advertisement
magnusbakken

Untitled

Jan 28th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.19 KB | None | 0 0
  1.     public virtual void RefreshSchema()
  2.     {
  3.       this._dbSchemaTable = (DataTable) null;
  4.       this._dbSchemaRows = (DbSchemaRow[]) null;
  5.       this._sourceColumnNames = (string[]) null;
  6.       this._quotedBaseTableName = (string) null;
  7.       DbDataAdapter dataAdapter = this.DataAdapter;
  8.       if (dataAdapter != null)
  9.       {
  10.         if (this.InsertCommand == dataAdapter.InsertCommand)
  11.           dataAdapter.InsertCommand = (DbCommand) null;
  12.         if (this.UpdateCommand == dataAdapter.UpdateCommand)
  13.           dataAdapter.UpdateCommand = (DbCommand) null;
  14.         if (this.DeleteCommand == dataAdapter.DeleteCommand)
  15.           dataAdapter.DeleteCommand = (DbCommand) null;
  16.       }
  17.       DbCommand insertCommand;
  18.       if ((insertCommand = this.InsertCommand) != null)
  19.         insertCommand.Dispose();
  20.       DbCommand updateCommand;
  21.       if ((updateCommand = this.UpdateCommand) != null)
  22.         updateCommand.Dispose();
  23.       DbCommand deleteCommand;
  24.       if ((deleteCommand = this.DeleteCommand) != null)
  25.         deleteCommand.Dispose();
  26.       this.InsertCommand = (DbCommand) null;
  27.       this.UpdateCommand = (DbCommand) null;
  28.       this.DeleteCommand = (DbCommand) null;
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement