Solved

VB2008  BASIC  COPY TABLE TO ANOTHER

Posted on 2013-01-18
1
188 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

14 Experts available now in Live!

Get 1:1 Help Now