Well you can write a generic function in your data access layer. first run a
check to see if you have the table in your db, next iterate the dataset and
start inserting records.
* Get the Table myDT from the DataSet myDS
* You will have to juggle a bit to create the create table statement from
the DataTable
* execute the create table and then do a "select * from tablename " from sql
server
* once you get the new dataset newDS,
iterate the myDT (using i)
call newDS.Tables[0].ImportRow(myDT.Rows[i]
once done importing the rows
newDS.Tables[0].AcceptChanges
i did start coding but it will take me a while plus i gotta leave for work
now.. will do something of this sort in the evening and post it if necessary
Chao,
Hermit Dave
"SK" <an*******@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
Hi,
i m populating a datagrid with data from excel. is it possible to take the
datatable in this dataset and create the same as a new table in SQl
database. can some one gimme ideas to solve the same in different ways