473,706 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to put a collection into dataset?

I use a method that returns either a dataset or a collection depending
on the method called. Since no database is involved at the layer I'm
working, I can't use a data adapter's fill method to fill these results
into my local dataset. How can I get these results into the local

I need the results place into a dataset to allow working with
DataGridTableSt yle for grid formatting.


Dec 12 '05 #1
2 1147
Loop through the collection and dynamically create a DataTable in
memory, then you can stick that DataTable in you dataset if you need it
in there.

Dec 12 '05 #2

You shouldn't have to get the results into a dataset to allow wirking
with the DataGridTableSt yle... It should be able to work with whatever
BindingManager is being used to get the data from.

If you want to populate a data set, then it is easy, all you have to do
is get the appropriate table, and call the Add method on the
DataRowCollecti on returned to you from the Rows property.

Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Brett Romero" <ac*****@cygen. com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
I use a method that returns either a dataset or a collection depending
on the method called. Since no database is involved at the layer I'm
working, I can't use a data adapter's fill method to fill these results
into my local dataset. How can I get these results into the local

I need the results place into a dataset to allow working with
DataGridTableSt yle for grid formatting.


Dec 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: jamie_m_ | last post by:
I have a custom collection ... clFile that INHERITS from NameObjectCollectionBase the problem is, when I try to create an xmlserializer instance i get an error You must implement a default accessor on brWAP.clFile because it inherits from ICollectio I must be having a thick day because I dont have a clue what the error message means. (I have written a defaut property called ITEM in the clFile class 'Classes to abstract a FILE entity...
by: Mel | last post by:
I have a large collection of custom objects, each representing a period in time with each having a start datetime and an end datetime. I frequently need to query this collection to return a subset of the objects that fall completely or partially between two specified dates. The way I'm doing this at the moment is to iterate thru the entire collection on each query and pull out the valid objects, but this is hardly an optimal way to do it....
by: NuB | last post by:
I have a collection of data, that i'm looping thru and reading and populating a file. Can i make that collection into a dataset so i can then create a dataview, or dataTable to then sort, etc, thru it.
by: Alfred Taylor | last post by:
I'm testing the waters of n-tier development and I ran into a scenario that I'm not sure what the best solution would be. I have a Company object which contains a collection of contacts retrieved from a database. In the presentation layer, the user will be able to add/delete/modify this collection in which case it needs to be synced with the database. The question is basically how best to do this? Aside from overriding the add/remove...
by: Bob Day | last post by:
Using vs2003, vb.net, msde... I have Component Designer class that has many datasets in it. I would like a way to iterate through the DataSets in an instantiation of the Component Designer class, but don'see any collect available to do that. ' holds Dataset Dim DS As DataSet ' instantiat component designer class
by: Craig Buchanan | last post by:
Which vb.net object is the best match for the vb6 collection class? Specifically, I would like to be able to access the Item property with an index or a key string. I wrote my own class that inherits from the collectionbase and uses an arraylist to hold values, but i'm missing the Item(string) property. I suppose I could iterate thru the collection and look for a string match, but I thought there might be an easier way. Thanks,
by: GBR | last post by:
I have a collection object inherited from collection base that is used to carry my object entities from server to client through a web service. I want to add a dataset to this collection object and send it across. But when it gets to the web server, its failing. Any help would be abvised? Is this possible? Can I add a dataset object and add it into the collection array and pass it across?
by: Brad | last post by:
I have an application that is highly CRUD-centric for data management with some more sophisticated reporting behavior. I'm trying to decide between using strongly typed datasets vs. collections of objects. I want to decouple the business logic and UI from the persistent storage so that the impact on changing the database doesn't ripple upwards. At first blush it appears that the dataset approach forces some coupling. Would somebody...
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, In my vb2005 app I create 3 datatables in the Datasource area, tbl1, tbl2, tbl3. tbl1 contains 1 column, tbl2 contains 2 columns tbl3 contains 3 columns. Based on selections from a form, I want to populate on 1 of the 3 tables with data and use the selected table throughout some procedure - the table and the data that it contains will have to persist throughout the life of the application. So instead of having a bunch of...
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection class on-the-fly based on the fields in the dataset and then creates and populates the classes and adds them into the collection. Thanks
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.