Posted on: 8/16/2013 10:32:31 PM | Views : 611

I have a store procedure like this:
ALTER PROCEDURE [dbo].[o_By_RNum] @rNum varchar(50) ,@ServiceType varchar(50) ,@Direction varchar(1) = NULL ,@VendorID int AS Declare @onum int If @Direction is Null Begin SELECT @onum = o_num FROM RemoteOrder WHERE r_num LIKE @rNum AND r_ServiceType = @ServiceType AND VendorID = @VendorID End Else Begin SELECT @onum = o_num FROM RemoteOrder WHERE r_num LIKE @rNum AND r_ServiceType = @ServiceType AND Direction = @Direction AND VendorID = @VendorID End RETURN ISNULL(@onum,0) when I run this store procedure in management studi, I only get “Command(s) completed successfully.”
How in my vb.net code with a simple if statement I can check if @onum is 0 do something.
I never work with this kind, usually store procedure return an empty row when it doesn’t have a value.
this is my vb.net code ...

Go to the complete details ...