Thursday, August 11, 2005

Empty Dataset

Ever need an empty dataset? Probably not, but if you ever have the need of an empty DataSet object in an ADO.NET application, try the following:


DataSet ds = new DataSet();
DataTable dt = new DataTable("emptyTable");
ds.Tables.Add(dt);

No comments: