Create a datareader. As you read through the reader, create a record and populate each field. If you keep the names consistient, it is as easy as iterating through a collection.
I suspect in the background, this is exactly what the fill method does.
>John,
>
>We still use the DataAdapter to Fill DataSets ... I don't know any other way to do it. Do you have a better way?
>
>~~Bonnie
>
>
>>I just finished a piece for Code Magazine on this. The thesis of the article deals with building a vb .net class that can best be described as a data-tier class that manages the creating of datasets and the retreval, updates, inserts, and deletes of data.
>>
>>IMO, the data adapter requires a lot of setup (table mappings, etc) that add alot of overhead. At this stage of the game, I have made the conclusion that they take away efficiency as opposed to enhancing efficiency. I may be wrong and if I am, I hope that somebody will correct me on this...
>>
>>>
>>I dunno - all I've got is the "alpha" copy and I'm not sure it was even dealing with it. BTW - I heard that you were advocating "not using data adapters and/or command builder" recently? Is this accurate and if so, what is best approach you've found?
>>>
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement