Wednesday, March 7, 2012

How to add a new column to a Dataset

I have had to add a new column to a mobile 5 database in VS2005. I obviously have added it in the wrong way. I have two applications that use the same db. The .net application accesses the table with the new column fine., this is where I added it first. When I try to add the column to the Compact framework (Pocket Pc) app I get this error when I try to run the application. In both applications the Server explorer shows the new column.

The column name is not valid. [ Node name (if any) = ,Column name = GUID ]

As long as I remove the GUID column from the tableadapter.fill sql the program runs the same as before.( even though the sql executes in the query designer with the GUID column in the sql statement.)

How do I add the column so that the Dataset.designer.cs gets updated and can load the new column?

Thanks I hope this make sense.

Jon Stroh

Rename the column to something other than "GUID"...

No comments:

Post a Comment