I’d like to utilize Select & Insert statements on a DataTable in VB.NET or C#.
Example:
Dim Results as DataTable
Results = Select * from SourceDataTable where PlayerID < 10
Is anything similar to this possible?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re using .NET 3.5 then you can use LINQ (I don’t know the VB.NET syntax, so here’s C#):
It’s not exactly the same, but certainly pretty close to “natural” SQL syntax. LINQ also has the advantage that it works on any collection type (and even directly against the database, using LINQ-to-SQL), not just DataTables.