Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

2 data adapters, 1 dataset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J - 25 Mar 2008 22:19 GMT
I want to read a .csv file into a dataset using an OleDbDataAdapter, then
update a SQL table from these rows.  Is there any easier or more efficient
way to do this instead of spinning through the dataset rows and firing off
an INSERT for each of these rows?  It seems to me that after I'd filled the
dataset using the OleDbDataAdapter, I could create an SqlDataAdapter for use
with this same dataset for updating.  Seems as if I'd also need to map the
fields in the dataset to the Sql table.  This all seems possible but I'm not
getting there with the code.  Any help is appreciated.
sloan - 25 Mar 2008 22:25 GMT
Ship the dataset.GetXml() off to Sql Server...and allow it to process it.

http://support.microsoft.com/kb/315968

Note, Sql Server 2005 has a different method than OPENXML you might
investigate.

>I want to read a .csv file into a dataset using an OleDbDataAdapter, then
>update a SQL table from these rows.  Is there any easier or more efficient
[quoted text clipped - 4 lines]
>the fields in the dataset to the Sql table.  This all seems possible but
>I'm not getting there with the code.  Any help is appreciated.
bruce barker - 25 Mar 2008 22:49 GMT
yes, thats what dataadapters where designed for and are  seperate from
datasets.

-- bruce (sqlwork.com)

> I want to read a .csv file into a dataset using an OleDbDataAdapter, then
> update a SQL table from these rows.  Is there any easier or more efficient
[quoted text clipped - 4 lines]
> fields in the dataset to the Sql table.  This all seems possible but I'm not
> getting there with the code.  Any help is appreciated.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.