|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Getting an emty datasetWhat is the best way to get an empty datatable (or data row) that is
formatted like a row in my sql table, I assume that doing a select * from table where 1 = 0 is not a very efficient way to do it? Do I some how define the table structure as an object which would needs to be updated if a column was added to the database? What I need to be able to do is reference the columns in my datarow, by the name that they are called in the database. Thanks David,
You can use the dataadapter's FillSchema method. Kerry Moorman Show quoteHide quote "David A. Osborn" wrote: > What is the best way to get an empty datatable (or data row) that is > formatted like a row in my sql table, I assume that doing a select * from > table where 1 = 0 is not a very efficient way to do it? Do I some how > define the table structure as an object which would needs to be updated if a > column was added to the database? What I need to be able to do is reference > the columns in my datarow, by the name that they are called in the database. > Thanks > > > |
|||||||||||||||||||||||