Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-10-16 : 10:11:47
|
Hello all,i am not able insert values into through store Procedure showing an error Msg 2756, Level 16, State 1, Procedure usp_HandleException, Line 54Invalid value 547 for state. Valid range is from 0 to 255.in Sp side i pass three parameters @i_AppUserId KEYID , @i_PatientUserId KEYID , @t_tUserMeasure tUserMeasure readonlyin that one is @t_tUserMeasure User DefinedTableType (MeasureIdMeasureUOMIdMeasureValueTextMeasureValueNumericCommentsdatetakenDataSourceid)and rest of the columns outside :isPatientAdministered , DueDate , StatusCode , CreatedByUserId,now i am executing to insert like this declare @t_tUserMeasure tUserMeasureinsert into @t_tUserMeasure values(1,1,'quantity','Testing','20120720',1)exec [usp_UserMeasure_MultiInsert]@i_AppUserId = 23,@i_PatientUserId = 226650,@t_tUserMeasure = @t_tUserMeasurebut no result???????P.V.P.MOhan |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-10-16 : 10:24:11
|
What do you say about this?Invalid value 547 for state. Valid range is from 0 to 255 Too old to Rock'n'Roll too young to die. |
|
|
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-10-17 : 01:46:48
|
Hey web fredIn table Type defind function i had extra parameter and i gave dummy ID's of reference tables.So thats the reason it shown error after some modifications it worked out well declare @t_tUserMeasure tUserMeasureinsert into @t_tUserMeasure values(55,1,'quant','Testing','2012-07-20',1)exec [usp_UserMeasure_MultiInsert]@i_AppUserId = 23,@i_PatientUserId = 214559,@t_tUserMeasure = @t_tUserMeasureP.V.P.MOhan |
|
|
|
|
|
|
|