Return Scalar

Lets return the value of spCountCities:


CREATE PROCEDURE spCountCities	
AS
BEGIN
	SET NOCOUNT ON;
	SELECT Count(*) FROM CITIES
END
GO


  1. Like other types, you need to create a Paulovich Command.


 (int)(command.ExecuteQuery("spCountCities", ReturnType.Scalar));

Last edited Feb 10, 2009 at 10:22 AM by paulovich, version 3

Comments

No comments yet.