B
Brian Conway
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(ConfigurationSettings.AppSettings["ReportRequestConnectionSt
ring"]);
OleDbDataAdapter da = new OleDbDataAdapter(sqlQuery, conn);
// OleDbParameter myParm = da.SelectCommand.Parameters.Add(ppRequestID,
OleDbType.Numeric, 8, ppRequestID);
conn.Open();
DataSet ds = new DataSet();
da.Fill(ds, "Report");
lblFirstName.Text = (string)ds.Tables[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(ConfigurationSettings.AppSettings["ReportRequestConnectionSt
ring"]);
OleDbDataAdapter da = new OleDbDataAdapter(sqlQuery, conn);
// OleDbParameter myParm = da.SelectCommand.Parameters.Add(ppRequestID,
OleDbType.Numeric, 8, ppRequestID);
conn.Open();
DataSet ds = new DataSet();
da.Fill(ds, "Report");
lblFirstName.Text = (string)ds.Tables[0].Rows[0]["created_by"];
conn.Close();
}