IsBindingSuspended. Why???

Yuliya

Active member
Joined
Nov 9, 2007
Messages
34
Programming Experience
Beginner
I had a piece of code that used to work perfectly. A Windows form displaying a table in a database, with the "Details" view (labels and textboxes). When the user fills out the form, it gets saved into the database. Very straightforward.

All of a sudden, it stopped working. After poking around here and there, I discovered that the TableAdapter's IsBindingSuspended property is set to True. I can't figure out why it got set to true. I would appreciate any help.
 
did you know you can probably set a watch that will cause code to break as soon as the value changes? That way youre notified isntantly of what code caused the change

Incidentally, a tableadapter is a device for moving data to and from a database. it has no innate data storage capabilities of its own and therefore cannot be used in a binding context. Perhaps youre confused over what youre actually talking about; ensure you get the terms correct when posting to forums because it's really no good saying "TableAdapter" when you mean "BindingSource" ; chalk and cheese :/
 
You're right, it's the BindingSource's property. Sorry about that.

BindingSource.IsBindingSuspended is already set to True at load time of the Windows Form. Where do I go from here?

Thank you.
 
Not sure.. I have projects where some BS are suspended aft erhte form loads and some arent.. I dont really rate it as significant. Perhaps you were doing the data access wrong before and a service pack fixed some bug you were errantly relying on?

Are you sure its nothing as simple as whatever data you were selecting before has now gone away? Read DW2 in my sig, take 5 mintues to amke an app that jkust dumps that table out the db, check all is healthy, then witchhunt your code
 
I am really confused now. I tried to change IsBindingSuspended manually before filling the DataSet by calling BindingSource.ResumeBinding(). Didn't do anything. The value of IsBindingSuspended remained True.

But my code seems to be working now, even though I didn't change anything. Hope it keeps working.
 
Back
Top