XML to DB Table and Identity Column

I have an XML file that I would like to load into a SQLServer table. My question is - the DB table has an autoincrement identity column. The XML does not contain a Unique ID element. What is the best way to read the XML into a strongly typed dataset of the table ? Can I read the XML data into the dataset without having to XPath each element and inserting the data into the dataset using an SQL INSERT query ?

For instance:

someplace nice


needs to be imported into table:
create table users (
userid int IDENTITY(1,1),
firstname varchar(10),
lastname varchar(10),
address varchar(10)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!