views:

128

answers:

1

I have a dataset with a number of data columns, due to sizing issues I've updated a number of the varchar columns from say VARCHAR(20) to VARCHAR(50).

I'd like the DataTable to automatically grab the new column information, is this possible? I'd rather not go through each column in the table and update the length.

A: 

Deleting and recreating the DataTable in the designer did not the job? I'm wondering.

Well, long time ago (5 years?) I made a small program which was able to read a SQL Server Database Schema and create that DataSet for me. Sorry - I do not have that code any more.

"All you have to do" is to read the database schema (for SQL Server the Table sysobjects and syscolumns) and create the Dataset by instantiating DataTable and DataColumn objects.

Maybe not the best option for you, but in my case it was a great option.

(Remark: No I'm using OR Mapper - no Datasets anymore)

Arthur
Thanks, I didn't try the delete and re-create the datatable, there are other queries attached to it. I'll give it a shot
Nathan Koop