[dba-VB] OleDBAdapter vs SQLDataAdapter

chizotz at mchsi.com chizotz at mchsi.com
Mon Nov 15 13:56:23 CST 2004


It would be the .Text property, not .Value, but yes, that's the general idea :)

Also, that will work only if the data adapter is on the form with the unbound 
textbox. I frequently work in an MDI environment where I have a MDI parent 
main form where the dates and other parameters are entered, but the data 
adapter that must be filled is on an MDI child form. In that case, I use 
something like this to get to the entered parameter values:

formMain mainForm = null;
mainForm = (formMain)this.MdiParent;
DateTime curStartDate = Convert.ToDateTime(mainForm.textBoxStartDate.Text);
DateTime curEndDate = Convert.ToDateTime(mainForm.textBoxEndDate.Text);

This creates a new instance of formMain and then sets it equal to the 
executing instance of the form, which opens up the text boxes -- which have 
their modifiers marked Public -- to be accessed by the child form.

HTH,

Ron



> So if my @startdate is an unbound field on a form, then @startdate =
> me.startdate.value?





More information about the dba-VB mailing list