Hi there,
I have a storec proc that schedules a Sql job and finally it returns
0 then it was successfull and if it returns 1 then its unsuccessful.
Now when i run the stored proc in the query analyzer its returning
SQLServerAgent is not currently running so it cannot be notified of
this action.
Stored Procedure: aisinspect.dbo.SP_ChangeInspectionDateNew
Return Code = 0
So in my code behind page i am trying to retrieve the restult with the
below line of code.
Result = cmd.ExecuteScalar.ToString
But its throwing "Object reference not set to an instance of an
object."
I know that ExectureSclara returns the first row first column value.
But my stored proc doesn't return as a row column result its simply
displyaing the above text.
So i am just wondering any other method of cmd object that return the
above sort of values? or i do need to change my stored proc just to
return the result in a row (either 0 or 1) so that i can use
Executescalar in my codebehind page?
Thanks
-L