Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    4

    Red face Unanswered: error in accessing stored procedure

    i'm trying to insert into db sql 2000 through a stored procedure .. i got this error " Procedure or function newuser has too many arguments specified "

    this is the procedure :



    ALTER PROCEDURE newuser

    (@username_1 [nvarchar](80),

    @email_2 [nvarchar](50),

    @password_3 [nvarchar](256),

    @Country_ID_4 [int],

    @city_id_5 [nvarchar](10),

    @gender_6 [nvarchar](50),

    @age_7 [int],

    @fname_8 [nvarchar](50),

    @lname_9 [nvarchar](50),

    @birthdate_10 [datetime])

    AS INSERT INTO [Brazers].[dbo].[users]

    ( [username],

    [email],

    [password],

    [Country.ID],

    [city.id],

    [gender],

    [age],

    [fname],

    [lname],

    [birthdate])


    VALUES

    ( @username_1,

    @email_2,

    @password_3,

    @Country_ID_4,

    @city_id_5,

    @gender_6,

    @age_7,

    @fname_8,

    @lname_9,

    @birthdate_10)







    & that 's the code in asp page :



    Dim param As New SqlClient.SqlParameter

    SqlConnection1.Open()

    param.ParameterName = "@username_1"

    param.Value = TextBox1.Text

    param.Direction = ParameterDirection.Input

    SqlCommand1.Parameters.Add(param)

    SqlCommand1.ExecuteNonQuery()







    plz .. waiting any solve for this problem immediately

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    it looks to me like you have too FEW arguments specified. the sproc takes 10 params, none of them optional, and you are only passing ONE.

  3. #3
    Join Date
    Oct 2006
    Posts
    4
    sorry jazmine but i don't know wt to do to make it works .. plz tell me steps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •