Solved

Fill data into the default table of Typed DataSet!

Posted on 2004-09-15
6
229 Views
Last Modified: 2010-04-15
Assume we have a typed DataSet called CExchange_RateList of table Exchange_Rate in the database. This typed dataset has a default table Exchange_Rate.
So how can I fill this table with the result of the command "Select * from Exchange_Rate". It means that the table CExchange_Rate.Exchange_Rate will contain the result of the command "Select * from Exchange_Rate"
Thank you very much!
0
Comment
Question by:tinh911
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 125 total points
ID: 12071924

  CExchange_RateList = command.ExecuteDataset();

Now  CExchange_RateList.Tables[0] that is the table Exchange_Rate will contain the result of the select statement
0
 
LVL 8

Assisted Solution

by:gregasm
gregasm earned 125 total points
ID: 12071933
this is what i would do

DataAdapter da = new DataAdapter();
da.SelectCommand = command;

da.Fill(dataSet.Tables["Exchange_Rate"]);

//or

da.Fill(dataSet.Tables[0]);

the key would be to set the SelectCommand property of a dataadapter and use that.
I dunno, 123454354's suggestion probably works too, but this is what I would do and variety is the spice of life =]]
0
 
LVL 8

Expert Comment

by:gregasm
ID: 12366153
The question is quite straightforward.

I can't vouch for  123654789987's solution, but I know mine works.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change to file doesn't show up 16 93
Save json data from URL using SSIS 1 72
.NET Enums [Flags] & Bitwise Design Question 6 49
VS C# how to design libary of functions 7 27
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

738 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