I am trying to archive a datagrid into a datatable so I can find it in the table by the archive date. I am using an INSERT SQL statement as follows:
INSERT INTO [VendorArchive] ([Booth], [Deposit], [Rent], [Electric], [Security],
[AmountPaid], [DatePaid], [PeriodPaid], [TotalDue], [Notes], [ArchiveDate],
[BalanceDue], GETDATE());
SELECT Booth, Deposit, Rent, Electric, Security AmountPaid, DatePaid, PeriodPaid,
TotalDue, BalanceDue, Notes
FROM Vendors
I then call the sql function in my code inside a button click event:
private void vendorArchiveToolStripButton_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure you wish to archive?", "Perform Archive", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
vendorArchiveTableAdapter.PerformArchive();
MessageBox.Show("Archive has completed.");
}
}
When i debug and hit the archive button I get this error: "No overload for method 'PerformArchive' takes 0 arguments"
I don't understand. Am I using the wrong SQL statement? Do I need to add all the columns as argumnets in the method call?
Please help.