>>> DataTable tbl = new DataTable(); >>> using (OleDbConnection con = new OleDbConnection( >>> "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;"+ >>> @"Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\northwind.sdf;")) >>> { >>> con.Open(); >>> OleDbCommand cmd = con.CreateCommand(); >>> cmd.CommandText = "select * from customers"; >>> OleDbDataReader rdr = cmd.ExecuteReader(); >>> tbl.Load(rdr); >>> con.Close(); >>> } >>> >>> DataTable usaCustomers = >>> tbl.AsEnumerable() >>> .Where(c => c.Field<string>("Country") == "USA") >>> .CopyToDataTable(); >>> >>> DataTable ukCustomers = >>> tbl.AsEnumerable() >>> .Where(c => c.Field<string>("Country") == "UK") >>> .CopyToDataTable(); >>> >>>// usaCustomers.Dump("USA"); >>>// ukCustomers.Dump("UK"); >>>Cetin