ALTER PROCEDURE dbo.Number AS select count(*) as total from site RETURN
SqlCommand storedProcCommand = new SqlCommand("Number", con); storedProcCommand.CommandType = CommandType.StoredProcedure; con.Open(); SqlDataReader dr = storedProcCommand.ExecuteReader(); if (dr.HasRows) { object[] values = new object[dr.FieldCount]; Int32 ob = dr.GetInt32(0); ob = dr.GetInt32(0); }
if (dr.Read()) { object[] values = new object[dr.FieldCount]; Int32 ob = dr.GetInt32(0); ob = dr.GetInt32(0) }
if (dr.HasRows) { while (dr.Read()) { object[] values = new object[dr.FieldCount]; Int32 ob = dr.GetInt32(0); ob = dr.GetInt32(0); } } dr.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)