column X does not belong to table X


Author
Message
Sam Garvin
Sam Garvin
StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)
Group: Forum Members
Posts: 10, Visits: 37
Hi again

I'm really sorry to bother you with this stupid error, but I haven't been able to fix it.

I modified a table structure ( I added more fields ), but there was already a BO associated to that table, so I opened the BO Mapper, re-configured the existing BO and I could see all the fields (new and old), I rebuilt the partial, I went back to VS and checked the BO.designer.cs file and the code for the new fields was already there, next I created a maintenance form, dropped my BO, added textboxes, etc. and did the binding.

But when I debugged the solution I got an error that says: column X does not belong to table X, the exception was raised in the BO.designer.cs file in the field properties region.

Ok, if I change the fields binded to my textboxes and use the ones that already existed before the structure changes everything works fine, it only happens when I use the new added fields.

Maybe I'm skipping one o more steps when configuring the BO or something.

Again I'm so sorry to bother you with this, any help would be highly appreciated

Thanks in advance!!!!

Replies
Sam Garvin
Sam Garvin
StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)StrataFrame Beginner (10 reputation)
Group: Forum Members
Posts: 10, Visits: 37
Hi

I made the structure changes using the SQL Server Management Studio Express.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
This could come from several places depending on where and when you are getting this error.  But the most common error is that your query doesn't include all of the columns, so when you reference the strong-typed property of the new column, it doesn't actually exist within the CurrentDataTable.  The first thing that I would do is put a break point on the Get or Set of the strong-typed property in question, and when it breaks, put the following in the watch window:

MyBO.CurrentDataTable

Does the column(s) in question actually exist?  If not, there is your problem.  Otherwise, please post the full stack trace so that we can see where the error is originating.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search