|
-
Sep 3rd, 2004, 09:10 AM
#1
Thread Starter
Fanatic Member
Dataset/Table question
I have a dataset which has 1 table with 10 coloumns and n rows.
I create a new table "newTable" which contains 2 coloumns "A" and "B".
I want to copy the contents of col 7 and col 8 of the original dataset/table into "newTable".
Whats the most efficient way of doing this ?
Coming up with a refined way of doing this is important as I perform this operation often in my application.
-
Sep 3rd, 2004, 09:26 AM
#2
Frenzied Member
Try something like this
Code:
Dim NewTable As DataTable
Dim dsCopy As DataSet
dsCopy = OriginalDataSet.Copy
NewTable = dsCopy.Tables.Add("NewTableName")
With NewTable
.Columns.Add("Field7", GetType(String))
.Columns.Add("Field8", GetType(String))
End With
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Sep 3rd, 2004, 10:07 AM
#3
Thread Starter
Fanatic Member
Do I have to create a new dataset ?
Can I not just create a new table and copy the details from the old table to the new ?
-
Sep 3rd, 2004, 12:41 PM
#4
Frenzied Member
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Sep 3rd, 2004, 10:59 PM
#5
OriginalDataSet.Tables.Add("JimiHendrix")
-
Sep 5th, 2004, 10:52 AM
#6
Frenzied Member
Is Parksie really dead? I just read the thread in the C\C++ forum... I never really knew him but if he is dead that sucks. He seemed like a good guy.
Magiaus
If I helped give me some points.
-
Sep 5th, 2004, 11:31 AM
#7
Yes, I see how that would figure into datasets.
-
Sep 5th, 2004, 11:33 AM
#8
Frenzied Member
so your a mod now frog man? I was just wondering since you guys are all sporting the 1983 - 2004....
Magiaus
If I helped give me some points.
-
Sep 5th, 2004, 11:41 AM
#9
Originally posted by Magiaus
so your a mod now frog man? I was just wondering since you guys are all sporting the 1983 - 2004....
Nah, I don't earn enough money to become a mod here.
-
Sep 5th, 2004, 12:10 PM
#10
Frenzied Member
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|