V
vncntj
I have this Stored Procedure that is passed the following parameter
protected void btnNext_Click(object sender, EventArgs e)
{
Session["Locations"] = Locations.Text;
Server.Transfer("AudioVisual.aspx");
/* Calling on Stored Procedure */
string connectionStr =
@"server=localhost;uid="";pwd="";trusted_connection=true;database=PMAEvents";
SqlConnection connectObj = new SqlConnection(connectionStr);
SqlCommand commandObj = new SqlCommand("eventtest",
connectionStr);
commandObj.CommandType.StoredProcedure;
commandObj.Parameters.Add(new SqlParameter("@Locations",
SqlDbType.VarChar)).Value = Session["Locations"];
}
but I'm running into problems when I go to test to see if any values
were returned
if( recordreturned == 0 )
{
Server.Transfer("nextpage.aspx");
}
else{
//Stay on the same page!!!!
}
i'm a little stuck on the syntax to test if the sp returned any
records!
thanks
protected void btnNext_Click(object sender, EventArgs e)
{
Session["Locations"] = Locations.Text;
Server.Transfer("AudioVisual.aspx");
/* Calling on Stored Procedure */
string connectionStr =
@"server=localhost;uid="";pwd="";trusted_connection=true;database=PMAEvents";
SqlConnection connectObj = new SqlConnection(connectionStr);
SqlCommand commandObj = new SqlCommand("eventtest",
connectionStr);
commandObj.CommandType.StoredProcedure;
commandObj.Parameters.Add(new SqlParameter("@Locations",
SqlDbType.VarChar)).Value = Session["Locations"];
}
but I'm running into problems when I go to test to see if any values
were returned
if( recordreturned == 0 )
{
Server.Transfer("nextpage.aspx");
}
else{
//Stay on the same page!!!!
}
i'm a little stuck on the syntax to test if the sp returned any
records!
thanks