Thursday, March 22, 2012

error in updating field thru stor_proc

I'm trying to update 'password' field in a table thru a stored procedure which is called from my program.

I'm passing the values for password and the key fields.

While debugging I can see the values in each parameter, but I get an error that the 'value for password was not passed'.

Here's the program snippet for calling the stored proc.

All three parameters are 'varchar' type

dbConn.Open();

dbConn.CreateParameters(3);

dbConn.AddParameters(0, Pwd, newPwd);

dbConn.AddParameters(1, Login, pwd_Login);

dbConn.AddParameters(2, IdNum, pwd_IdNum);

result = dbMgr.ExecuteNonQuery(CommandType.StoredProcedure, SP_UPDPWD);

--

EXEC @.return_value = [dbo].[usp_UsrMstUpdPwdParaPwdEmailCaseNum]

@.Pwd = N'3Sg7vqowIBRdfgdfgrgdjykFTjTFt5hfHfhFtFghzIG1haWRliBuYW1lPw==',

@.Login = N'xyz@.abc.com',

@.IdNumber = N'00009'

--

What am I missing?

Is Pwd a variable or constant set to "@.Pwd", login to "@.Login", IdNum to "@.IdNum", and "SP_UPDPWD" to the appropriate string for your stored procedure?

Also, is this using an IDBManager pattern?

Thanks,

John

|||

Never mind. found the problem

The parameter for Password was not spelt right!

No comments:

Post a Comment