I am trying to get a parameter passed from one page to another in a
QueryString to get inserted into the select statement on the page that is
getting called. If I hard code in a value everything works, but I can't
figure out how to get it to pass in as a parameter. Here is what I have.
The parameter section doesn't work though.
OleDbConnection conn = new
OleDbConnection (ConfigurationS ettings.AppSett ings["ReportRequestC onnectionSt
ring"]);
OleDbDataAdapte r da = new OleDbDataAdapte r(sqlQuery, conn);
// OleDbParameter myParm = da.SelectComman d.Parameters.Ad d(ppRequestID,
OleDbType.Numer ic, 8, ppRequestID);
conn.Open();
DataSet ds = new DataSet();
da.Fill(ds, "Report");
lblFirstName.Te xt = (string)ds.Tabl es[0].Rows[0]["created_by "];
conn.Close();
}
QueryString to get inserted into the select statement on the page that is
getting called. If I hard code in a value everything works, but I can't
figure out how to get it to pass in as a parameter. Here is what I have.
The parameter section doesn't work though.
OleDbConnection conn = new
OleDbConnection (ConfigurationS ettings.AppSett ings["ReportRequestC onnectionSt
ring"]);
OleDbDataAdapte r da = new OleDbDataAdapte r(sqlQuery, conn);
// OleDbParameter myParm = da.SelectComman d.Parameters.Ad d(ppRequestID,
OleDbType.Numer ic, 8, ppRequestID);
conn.Open();
DataSet ds = new DataSet();
da.Fill(ds, "Report");
lblFirstName.Te xt = (string)ds.Tabl es[0].Rows[0]["created_by "];
conn.Close();
}
Comment