I have two related questions: one. how can I create a temporary table using a stored proc in c# and is the way that I'm attempting it is wise
I have the simple stored procedure
create proc spMakeTempTable
as
begin
create table #temp(columnName varchar(max))
end
and the c#
protected void Page_Load(object sender, EventArgs e)
{
txtDrugList.Focus();
string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString;
using (SqlConnection con = new SqlConnection(cs))
{
using (var cmd = new SqlCommand("spMakeTempTable", con))
{
cmd.CommandType = CommandType.StoredProcedure;
}
}
}
I'm not sure what I should do because this proc doesn't return any rows so a SqlDataReader wouldn't mean anything, and when I run this the temp table isn't created. My situation is on the form t ...
Go to the complete details ...