Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB2008  BASIC  COPY TABLE TO ANOTHER

Posted on 2013-01-18
1
Medium Priority
?
249 Views
Last Modified: 2013-01-22
Hi EXPERTS

I HAVE A LARGE DATATABLE    DTR
I WOULD LIKE TO COPY PART OF DTR TO DTR2 WHERE DTR.KEYCODE COLUMN = 'SOLD'
THEN DISPLAY DTR2 IN A GRID



PLEASE HELP
0
Comment
Question by:b001
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 38795561
You might be able to use Linq-to-DataSet, and use a Where expression.

LINQ To DataSet Samples - DataSet Loading examples
http://msdn.microsoft.com/en-us/vstudio/bb738020#copydtable

Public Sub DataSetLinq117a()

    Dim customers = TestDS.Tables("Customers").AsEnumerable()
    Dim orders = TestDS.Tables("Orders").AsEnumerable()

    Dim query = From o In orders _
                Where o("Total") < 500.0# _
                Select o


    Dim results = query.CopyToDataTable()

Open in new window


    PrettyPrintDataTable(results)
End Sub
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question