Create DataTable From Existing DataTable

G

Gimen

i created a SataSet that contain several DataTables,
i need to create some more DataTables and DataVies,
the problem is that each of them should contain another
DataColumns, i eant to select the columns from the
existing tables not only the rows.
sample:
one of the datatables in the dataset contain those
DataColumns: firstName, lastName, address,phone,fax and
mobile,
i want to create DataView that carry all the rows that the
last name begin with 'A' , but the columns needed are only
the last name and first name.
 
M

Miha Markic

Hi Gimen,

You won't be able to limit the columns that DataView shows.
Rather don't display them at UI level.
 
G

Gimen

that what i did for now, but the source datatable is very
heavy and i want to save memory and trafic by sending only
the needed columns.
maybe working full connected is preferred in that
situation?
 
M

Miha Markic

Hi Gimen,

If the traffic is the problem, why don't you select just the columns you are
interested in?
 
G

Gimen

thats i'm trying to do,
-----Original Message-----
Hi Gimen,

If the traffic is the problem, why don't you select just the columns you are
interested in?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com




.
 
M

Miha Markic

Hmmm..
Instead of "SELECT * FROM Table" you should use "SELECT Column1, Column2
FROM Table".
Isn't this a solution?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top