Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 917627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:14:24+00:00 2026-05-15T18:14:24+00:00

I am trying to archive a datagrid into a datatable so I can find

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:14:25+00:00Added an answer on May 15, 2026 at 6:14 pm

    Your SQL query is wrong but the specific error you get has nothing to do with your SQL query.

    Somewhere in your project you have a method called PerformArchive and this method takes at least one parameter. You need to provide a value for that parameter.

    Assuming you are using Visual Studio, put the cursor on the method name and press F12 to go to the definition and then you can see what the parameters are.


    Regarding your SQL you need something like this:

    INSERT INTO [VendorArchive] (
        [Booth], [Deposit], [Rent], [Electric], [Security], [AmountPaid], [DatePaid], [PeriodPaid], [TotalDue], [BalanceDue], [Notes], [ArchiveDate]
    )
    SELECT
        [Booth], [Deposit], [Rent], [Electric], [Security], [AmountPaid], [DatePaid], [PeriodPaid], [TotalDue], [BalanceDue], [Notes], GETDATE()
    FROM Vendors
    

    Errors that I have fixed:

    • Removed extra semicolon.
    • Added missing comma between Security and AmountPaid.
    • Fixed the order of columns so that they match in INSERT and SELECT statements.
    • Moved GETDATE() to select list instead of insert column list.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create an add-in by using the article below http://blogs.microsoft.co.il/blogs/shair/archive/2008/07/28/how-to-create-sql-server-management-studio-addin.aspx I
While trying to zip an archive using the java.util.zip I ran into a lot
I am trying to archive, unarchive objects using NSKeyedArchiver, NSKeyedUnarchiver, NSCoding (initWithCoder, encodeWithCoder methods)
I am trying to organize a Zip Archive into an array so that I
I'm trying to implement an archive functionality into a webpage that will submit something
I was trying to archive an object into a plist file and load it
I've been trying to write a python code which can archive the files of
I'm trying to build a sfx (self extracting archive) using winrar. I'm using VS2008
I am trying to use the target which can be found http://ryanfarley.com/blog/archive/2010/05/06/announcing-the-growl-for-windows-target-for-nlog.aspx . I
what i am trying to archive here is to traverse within controls using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.