MS.Net question

yourbeliefs

Something Profound
Original poster
Pub Member / Supporter
Sep 20, 2007
13,170
276
Northeast
I'm being considered for a number of Microsoft.Net positions and I want to brush up on my programming skills so I don't appear to be an idiot. I was passed over by one place already I feel because of this, so I don't want it to happen again.

Basically I'm writing a program that is going to take a bunch of information from a dataset/datagridview and then put it into a table in SQL Server 2005. Unfortunately most of my training in SQL has dealt more with extraction of large amounts of data as opposed to large amounts of data being inserted. I don't know if the way to do it is a loop or a bulk copy, or what the code would look like for this.

I'm writing this in C#, but if people can figure out how to do this in another language it would be greatly appreciated. I can give some code if someone requests, but I'm not sure how relevant it would be at this point since right now all the code does is create a dataset from an XML file and then binds it to the datagridview.

TIA
 
most systems usually only insert one row at a time.. personally I use various forms of dataobjects from nhibernate, to linq, to custom.. which handles most of that behind the scenes, so to me it's all array work.. but if you wanted to script it out you would either loop through row by row creating an insert/update statement or specify params to call a stored proc.. if you're more proficent you could use the dataset to actually do the update.. depends on what the requirement is..
 
most systems usually only insert one row at a time.. personally I use various forms of dataobjects from nhibernate, to linq, to custom.. which handles most of that behind the scenes, so to me it's all array work.. but if you wanted to script it out you would either loop through row by row creating an insert/update statement or specify params to call a stored proc.. if you're more proficent you could use the dataset to actually do the update.. depends on what the requirement is..

I basically solved this using the SQLBulkTransfer. My next task will be eliminating the middleman and just using SQL Server to import an XML file and creating a table based off that.
 
I would recommend the book Pro ADO.NET 2.0 by Sahil Malik it deals with ADO.NET 2.0, is an easy read and great for someone wanting to brush up on their skills.
 

Who knows about subnet masks?

Big bonus on hard drive

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)