Exemplo n.º 1
0
		/// <summary>
		/// Save table data to another table
		/// </summary>
		/// <param name="table">VistaDBTable object</param>
		/// <returns>True if succed, otherwise false</returns>
		public bool SaveToDatabase(VistaDBTable table)
		{
			if(table == null || !table.Opened || !this.Opened)
				throw new VistaDBException(VistaDBErrorCodes.TableNotOpened);

			table.DeleteAllRows(false);

			lock(this.database.SyncRoot)
			{
				VistaDBAPI.ivdb_Select((ushort)this.tableId);
				return VistaDBAPI.ivdb_ImportToTable(table.TableID, null);
			}
		}