lothos12345 Posted November 1, 2005 Posted November 1, 2005 (edited) How do I execute sql commands against a dataset in Visual Basic.NET? Edited November 1, 2005 by lothos12345 Quote
VagabondSW Posted November 1, 2005 Posted November 1, 2005 You don't, as far as I know. What you can do is assign a DataColumn.Expression to a DataTable.Select method or a DataView.RowFilter property. Quote "Never ascribe to malice that which can adequately be explained by incompetence." -- Napolean Bonaparte
lothos12345 Posted November 1, 2005 Author Posted November 1, 2005 Is there away to filter out the duplicate records in the dataset in Visual Basic.NET? Quote
*Experts* Nerseus Posted November 2, 2005 *Experts* Posted November 2, 2005 You can use the .Select method of the DataTable to get a list of matching rows (a filter). You can also use a DataView to do the same filtering. Unfortunately, DISTINCT is not a keyword that's supported. The filtering represents mostly what you'd see in a WHERE clause such as "col = 'abc' and col2 < 5". Any type of duplicate matching will have to be done manually. You can also use the .Compute method to get aggregates, like MIN, MAX, SUM, etc. but that still won't help you get distinct rows. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
FZelle Posted November 2, 2005 Posted November 2, 2005 On planetsourcecode.com is a library called Sql-Engine. Thisone can perform SQL-queries on a dataset and returns a DataTable. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.