To retrieve different Versioned values from a DataRow indexer methods that accept a DataRowVerion value as a parameter.
Check the junk of code::
SqlConnection cn = new SqlConnection(connectionString); SqlDataAdapter dad = new SqlDataAdapter(sqlQuery, cn); DataSet ds = new DataSet();
//Calling the productDataTable method
productDataTable(ds); dad.Fill(ds, "Products"); foreach (DataRow r in ds.Tables[0].Rows) { //DisplayLabel.Text = r[0].ToString() + "--" + r[1].ToString() + " "; foreach (DataColumn dc in ds.Tables[0].Columns) { Label1.Text="Current"+dc.ColumnName + r[dc,DataRowVersion.Current]; Label2.Text = "Default" + r[dc, DataRowVersion.Default]; Label3.Text = "Original" + r[dc, DataRowVersion.Original];
} }
|
No responses found. Be the first to respond and make money from revenue sharing program.
|