Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Fill data into the default table of Typed DataSet!

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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