[dba-VB] C# Help with binding components

jwcolby jwcolby at colbyconsulting.com
Sun Mar 28 07:36:19 CDT 2010


I want to load one record in a main form - client, product etc.  I want to use a combo which SELECTS 
the client and on the change event, do some undefined thing to cause that client form to load the 
record selected with the client id from the combo.

Seems simple enough.

Except I am having difficulty understanding which of the binding objects hold what parts of the 
equation.

I created a "bound form" which pulls the entire table but displays the current record in individual 
controls.

So for starters, now that I have that, how do I set a sql statement to load just one record?  What 
component does that and what property?

Next, I have a navigation widget that causes the form to move through the records.  If I only have a 
single record I do not need that so I want to get rid of it.  I assume it is safe to just delete it?

Except that object also has the add new / delete and save buttons.  Hmm...

And finally (for now), have found code to watch the controls for changes and set a dirty flag.  How 
do I save the record?  What object / property?

Once I see this done one time I will be good to go but I am not finding code on the web that does 
this.  Everything assumes loading the entire recordset then filtering down.

Any assistance greatly appreciated.
-- 
John W. Colby
www.ColbyConsulting.com



More information about the dba-VB mailing list