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 3401454
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:01:05+00:00 2026-05-18T05:01:05+00:00

I am attempting to call SQL stored procedure that does an INSERT. However, when

  • 0

I am attempting to call SQL stored procedure that does an INSERT. However, when I walkthrough my vb.net code, I get a message saying “Procedure or function sp_InsertARPlanner has too many arguments specified.”

I have double checked, but the SQL string in VB has the same # of params as in the stored procedure.

Any ideas how I can debug this?

Update

    SQLCmd.CommandText = "sp_InsertARPlanner"
    SQLCmd.CommandType = CommandType.StoredProcedure

SQLCmd.Parameters.AddWithValue("@Origin", Trim(txtOrigin.Text))
SQLCmd.Parameters.AddWithValue("@Destination", Trim(txtDest.Text))
SQLCmd.Parameters.AddWithValue("@Miles", iMiles)
SQLCmd.Parameters.AddWithValue("@Rate", iAvgRateperMile)
SQLCmd.Parameters.AddWithValue("@MinCost", dMinCost)
SQLCmd.Parameters.AddWithValue("@Zone", sZone)
SQLCmd.Parameters.AddWithValue("@LaneHaulCost", dLaneHaulCost)
SQLCmd.Parameters.AddWithValue("@TotalCost", dTotalCost)              
SQLCmd.Parameters.AddWithValue("@TotalWithSurch", dTotalWithSurch)
SQLCmd.Parameters.AddWithValue("@AvgTypeRate", sAvgTypeRate)    
SQLCmd.Parameters.AddWithValue("@AvgLoads", sAvgLoads)          
SQLCmd.Parameters.AddWithValue("@FuelLevel", dFuelPercent)    
SQLCmd.Parameters.AddWithValue("@Fuel", dFuelAmount)      
SQLCmd.Parameters.AddWithValue("@AverageRateAmount", dAverageRateAmount)
SQLCmd.Parameters.AddWithValue("@Floor", decFloor)
SQLCmd.Parameters.AddWithValue("@RainBulkRate", decBulkRate)
SQLCmd.Parameters.AddWithValue("@RateComments", txtRateDesc..Text)
SQLCmd.Parameters.AddWithValue("@PremiumField", txtPremium.Text)
SQLCmd.Parameters.AddWithValue("@EquipCategory", Trim(cboEquipType.Text))
SQLCmd.Parameters.AddWithValue("@UpdateDate", DateTime.Now)
SQLCmd.Parameters.AddWithValue("@FreightDesc", "txtFreightDesc.Text")

Try
    SQLCmd.ExecuteNonQuery()
Catch ex As Exception
    MsgBox(ex.Message)
    SQLCon.Close()
    SQLCmd.Parameters.Clear()
    Exit Sub
End Try  

ALTER PROCEDURE [dbo].[sp_InsertARPlanner]
    (@Origin nvarchar(150)
           ,@Destination nvarchar(150)
           ,@Miles nvarchar(50)
           ,@Rate nvarchar(5)
           ,@MinCost decimal(5,2)
           ,@Zone varchar(3)
           ,@LaneHaulCost decimal(5, 2)
           ,@TotalCost decimal(5, 2)
           ,@TotalWithSurch decimal(5, 2)
           ,@AvgTypeRate varchar(50)
           ,@AvgLoads varchar(4)
           ,@FuelPercent decimal(5,2)
           ,@FuelAmount decimal(5,2)
           ,@AverageRateAmount decimal(5,2)
           ,@Floor decimal(5, 2)
           ,@RainBulkRate decimal(5, 2)
           ,@RateComments nvarchar(50)
           ,@PremiumField nvarchar(50)
           ,@EquipCategory nvarchar(50)
           ,@UpdateDate datetime
           ,@FreightDesc nvarchar(50))
  • 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-18T05:01:06+00:00Added an answer on May 18, 2026 at 5:01 am

    Try this:

    1. Don’t start your stored procedure name with sp_ That stands for system procedure in sql server, and will cause sql server to do extra work looking for your procedure (this isn’t your problem though, but it’s good practice).
    2. Take the procedure string that the program has created and paste it into the sql server management studio window, to make sure that it works there. If not then you know where the issue is.
    3. If so, make sure you are hitting the db you think your are. If you have multiple environments it maybe that the database you are hitting isn’t the one that has the correct number of parameters.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.