I have written a simple Stored Procedure but when I return the value to my vb.net program, it prints me null value, which is not true.<BR><BR>CREATE PROCEDURE calendar1 <BR>(<BR> @FName varchar(30),<BR> @CCount int<BR>)<BR>AS<BR> SELECT @CCount = Count(*) FROM Users<BR>GO<BR><BR><BR>My VB.net program is as follows:<BR><BR>Dim con As SqlConnection<BR>Dim cmd As SqlCommand<BR><BR>con = New SqlConnection("Server=localhost;UID=sa;pwd=;databa se=abc")<BR>cmd = New SqlCommand("calendar1", con)<BR>cmd.CommandType = CommandType.StoredProcedure<BR>cmd.Parameters.Add( "@FName", Name)<BR>cmd.Parameters.Add("@CCount", SqlDbType.Int, 4).Direction = ParameterDirection.Output<BR>Dim CCount As Integer = cmd.Parameters("@CCount").Value<BR>Response.Write( "Count = " & CCount & "<BR>")<BR>con.Open()<BR>cmd.ExecuteNonQuery()<BR> con.Close()<BR><BR>Can anyone help me out of where I have made mistake?<BR><BR>thx<BR><BR> <BR><BR><BR>