0

I'm asking about a problem with C# and Visual Studio 2012; I'm trying to resize a column of a table in my database, effect with the dataTableAdapter on a Dataset.xsd

I'm using DataTableAdapter from a stored procedure with a SELECT statement to populate a DataGridView, reports and many more.

I created the table long time ago, but now there is an a problem with it.

I had to increase the length of a column and I changed the appropriate column length of the DataTable also. But it didn't give me the solution. still whenever I Fill or Get data through that DataTableAdapter it response with the previous (original) size of the column.

But when I create a new DataTable and redirect my code to the new DataTableAdapter, it works.

Why is this happening ?

Because redirecting code to the new DataTableAdapter is little bit difficult because I don't know all the places it use in the entire solution.

And also if can please tell me how to add new column to the table and deal with the DataTableAdapter with it also.

Thanks and waiting for your reply.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Shammie
  • 131
  • 1
  • 7

1 Answers1

0

after doing small research with my friends , i got an proper way to fix this error.

not even re-sizing, but also any other change with the database Table or storedprocedure you have to reconfigure the dataTableAdaptor, unless it just work as , when it was created.

it will continue with major errors or sometimes, it will function incorrectly, even you cant figure out there is an error.

so whenever you do any change with the database Table or storedprocedure go to the dataSet.xsd , where the dataTable locate and right on the dataTable , then configure it again.

this saved me and worked.

Shammie
  • 131
  • 1
  • 7