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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:38:45+00:00 2026-05-29T10:38:45+00:00

Its our old friend again….. I am recieving this error and i cant think

  • 0

Its our old friend again…..
I am recieving this error and i cant think why. I have checked the number of parameters being passed as well as the number of required paramaters from the sp ,regenerating the data set has given me no look. I must have missed something basic. Another pair of eyes would be helpfull.

Thank you in advance

    Public Sub GetRows(ByVal [Option] As String, ByVal searchString As String)

    Me.DataSet11.Clear()

    SqlSelectCommand1.CommandType = CommandType.StoredProcedure
    SqlSelectCommand1.Parameters.AddWithValue("@Option", [Option])
    SqlSelectCommand1.Parameters.AddWithValue("@searchString", searchString.ToUpper)

    Try
        SqlConnection1.Open()
        'execute reader
        'rdr = SqlSelectCommand1.ExecuteReader
        Me.DataGridViewAvItems.DataSource = DataSet11.design_sp_search_drawings
        Me.SqlDataAdapter1.Fill(DataSet11, "design_sp_search_drawing")

    Catch ex As Exception
        MessageBox.Show(ex.Message)
    Finally
        'close the conenction
        SqlConnection1.Close()
    End Try

End Sub

///DESIGNER CODE

Me.SqlSelectCommand1.CommandText = "dbo.design_sp_search_drawings"
    Me.SqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure
    Me.SqlSelectCommand1.Connection = Me.SqlConnection1
    Me.SqlSelectCommand1.Parameters.AddRange(New System.Data.SqlClient.SqlParameter() {New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing), New System.Data.SqlClient.SqlParameter("@searchString", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, "TES0201"), New System.Data.SqlClient.SqlParameter("@Option", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, "site_code")})
  • 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-29T10:38:46+00:00Added an answer on May 29, 2026 at 10:38 am

    Aren’t you adding the Option and SearchString parameters more than once? In the designer code you showed at the bottom, you add the parameters @RETURN_VALUE, @searchString, and @Option with the call to AddRange and you are adding them again at the top of the code when you call AddWithValue for each one of them. So to me it looks as if you have added 5 parameters. Am I missing something? What does the sproc require?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a WP install in the root of our server and its running
can anyone help. I have recently moved servers, its IIS7 rather that our previous
We manage our inventories in Excel. I know its little old fashioned but we
I just saw some code in our code base (and it's OLD code, as
My program is getting a false positive from AVG. Its just our companies branded
Our product has the requirement of exporting its native format (essentially an XML file)
Our state government has opened its transport timetable data. The data is in xml
Our WinForms application has been reported to occasionally just close on its own. It
One of our views has a ScrollView as its root layout. When the device
Within our company we use a proprietary template engine, which stores its templates in

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.