?
Solved

Fill data into the default table of Typed DataSet!

Posted on 2004-09-15
6
Medium Priority
?
235 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 500 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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