Sunday, February 19, 2012

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 immediatelyit 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.|||sorry jazmine but i don't know wt to do to make it works .. plz tell me steps

No comments:

Post a Comment