Solved

VB2008  BASIC  COPY TABLE TO ANOTHER

Posted on 2013-01-18
1
201 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
POWERSHELL: do / until, should continue even when there is an error 4 55
Getfiles in vb.net 28 44
Not showing page correctly 3 31
C# Single Form 8 29
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)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

861 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now