Home All Groups Group Topic Archive Search About

Newbie Missing Something with Access DB Update Using VB .NET

Author
10 Jan 2007 2:50 AM
pooba53
I have a VB .NET application that is communicating properly with an
Access DB. I have a slew of textbox controls bound to a dataset and
when the application launches, the fields are correctly populated.

If someone changes a value in one of the text boxes, I need to have a
button capture the change and commit the update to Access. I know I'm
close, but something is missing. I have a data adapter called:
OleDbDataAdapter1

and a dataset called:
DsMyMonthlyIncome1

My button function is:
Try
OleDbDataAdapter1.Update(DsMyMonthlyIncome1)

Catch ex As Exception
MsgBox(ex.ToString)
End Try

No error occurs, but the changed information in the text field never
gets communicated to the Access DB. Have I not captured the changes by
having the textbox controls bound?

I've searched quite a bit today, and not found the information I seek.
I am lost here and appreciate the help.

Author
10 Jan 2007 4:21 AM
RobinS
When they change the entry, you need to do an EndEdit()
on the BindingSource (if you're using one) or whatever the
data source is in order to save the changes to the dataset.
Once you do that, the changes will be there to be propagated
back to the database using the Update command.

Robin S.
------------------------------

<poob***@gmail.com> wrote in message
Show quote
news:1168397402.974425.8820@p59g2000hsd.googlegroups.com...
>I have a VB .NET application that is communicating properly with an
> Access DB. I have a slew of textbox controls bound to a dataset and
> when the application launches, the fields are correctly populated.
>
> If someone changes a value in one of the text boxes, I need to have a
> button capture the change and commit the update to Access. I know I'm
> close, but something is missing. I have a data adapter called:
> OleDbDataAdapter1
>
> and a dataset called:
> DsMyMonthlyIncome1
>
> My button function is:
> Try
> OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
>
> Catch ex As Exception
> MsgBox(ex.ToString)
> End Try
>
> No error occurs, but the changed information in the text field never
> gets communicated to the Access DB. Have I not captured the changes by
> having the textbox controls bound?
>
> I've searched quite a bit today, and not found the information I seek.
> I am lost here and appreciate the help.
>
Author
10 Jan 2007 2:24 PM
pooba53
I'm afraid as a newbie, I don't quite understand what you mean. The
data is modified in a textbox. The way I bound the textboxes to their
Access counterparts was to within the textbox properties, choose
(Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly Net
Income as an example.

So what item do I call the EndEdit() on? Keep in mind, this is not a
datagrid, but a textbox.

I sure appreciate the help.
-Dan

Show quote
On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> When they change the entry, you need to do an EndEdit()
> on the BindingSource (if you're using one) or whatever the
> data source is in order to save the changes to the dataset.
> Once you do that, the changes will be there to be propagated
> back to the database using the Update command.
>
> Robin S.
> ------------------------------
>
> <poob***@gmail.com> wrote in messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
>
> >I have a VB .NET application that is communicating properly with an
> > Access DB. I have a slew of textbox controls bound to a dataset and
> > when the application launches, the fields are correctly populated.
>
> > If someone changes a value in one of the text boxes, I need to have a
> > button capture the change and commit the update to Access. I know I'm
> > close, but something is missing. I have a data adapter called:
> > OleDbDataAdapter1
>
> > and a dataset called:
> > DsMyMonthlyIncome1
>
> > My button function is:
> > Try
> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
>
> > Catch ex As Exception
> > MsgBox(ex.ToString)
> > End Try
>
> > No error occurs, but the changed information in the text field never
> > gets communicated to the Access DB. Have I not captured the changes by
> > having the textbox controls bound?
>
> > I've searched quite a bit today, and not found the information I seek.
> > I am lost here and appreciate the help.
Author
12 Jan 2007 12:14 AM
pooba53
Can anyone help me out here?
Thanks.

poob***@gmail.com wrote:
Show quote
> I'm afraid as a newbie, I don't quite understand what you mean. The
> data is modified in a textbox. The way I bound the textboxes to their
> Access counterparts was to within the textbox properties, choose
> (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly Net
> Income as an example.
>
> So what item do I call the EndEdit() on? Keep in mind, this is not a
> datagrid, but a textbox.
>
> I sure appreciate the help.
> -Dan
>
> On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> > When they change the entry, you need to do an EndEdit()
> > on the BindingSource (if you're using one) or whatever the
> > data source is in order to save the changes to the dataset.
> > Once you do that, the changes will be there to be propagated
> > back to the database using the Update command.
> >
> > Robin S.
> > ------------------------------
> >
> > <poob***@gmail.com> wrote in messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
> >
> > >I have a VB .NET application that is communicating properly with an
> > > Access DB. I have a slew of textbox controls bound to a dataset and
> > > when the application launches, the fields are correctly populated.
> >
> > > If someone changes a value in one of the text boxes, I need to have a
> > > button capture the change and commit the update to Access. I know I'm
> > > close, but something is missing. I have a data adapter called:
> > > OleDbDataAdapter1
> >
> > > and a dataset called:
> > > DsMyMonthlyIncome1
> >
> > > My button function is:
> > > Try
> > > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
> >
> > > Catch ex As Exception
> > > MsgBox(ex.ToString)
> > > End Try
> >
> > > No error occurs, but the changed information in the text field never
> > > gets communicated to the Access DB. Have I not captured the changes by
> > > having the textbox controls bound?
> >
> > > I've searched quite a bit today, and not found the information I seek.
> > > I am lost here and appreciate the help.
Author
12 Jan 2007 5:03 PM
RobinS
Are you doing VB2003 or VB2005?

Robin S.

<poob***@gmail.com> wrote in message
Show quote
news:1168439073.325426.20060@k58g2000hse.googlegroups.com...
> I'm afraid as a newbie, I don't quite understand what you mean. The
> data is modified in a textbox. The way I bound the textboxes to their
> Access counterparts was to within the textbox properties, choose
> (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly Net
> Income as an example.
>
> So what item do I call the EndEdit() on? Keep in mind, this is not a
> datagrid, but a textbox.
>
> I sure appreciate the help.
> -Dan
>
> On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
>> When they change the entry, you need to do an EndEdit()
>> on the BindingSource (if you're using one) or whatever the
>> data source is in order to save the changes to the dataset.
>> Once you do that, the changes will be there to be propagated
>> back to the database using the Update command.
>>
>> Robin S.
>> ------------------------------
>>
>> <poob***@gmail.com> wrote in
>> messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
>>
>> >I have a VB .NET application that is communicating properly with an
>> > Access DB. I have a slew of textbox controls bound to a dataset and
>> > when the application launches, the fields are correctly populated.
>>
>> > If someone changes a value in one of the text boxes, I need to have
>> > a
>> > button capture the change and commit the update to Access. I know
>> > I'm
>> > close, but something is missing. I have a data adapter called:
>> > OleDbDataAdapter1
>>
>> > and a dataset called:
>> > DsMyMonthlyIncome1
>>
>> > My button function is:
>> > Try
>> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
>>
>> > Catch ex As Exception
>> > MsgBox(ex.ToString)
>> > End Try
>>
>> > No error occurs, but the changed information in the text field
>> > never
>> > gets communicated to the Access DB. Have I not captured the changes
>> > by
>> > having the textbox controls bound?
>>
>> > I've searched quite a bit today, and not found the information I
>> > seek.
>> > I am lost here and appreciate the help.
>
Author
13 Jan 2007 2:37 PM
pooba53
VB2003

-Dan

RobinS wrote:
Show quote
> Are you doing VB2003 or VB2005?
>
> Robin S.
>
> <poob***@gmail.com> wrote in message
> news:1168439073.325426.20060@k58g2000hse.googlegroups.com...
> > I'm afraid as a newbie, I don't quite understand what you mean. The
> > data is modified in a textbox. The way I bound the textboxes to their
> > Access counterparts was to within the textbox properties, choose
> > (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly Net
> > Income as an example.
> >
> > So what item do I call the EndEdit() on? Keep in mind, this is not a
> > datagrid, but a textbox.
> >
> > I sure appreciate the help.
> > -Dan
> >
> > On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> >> When they change the entry, you need to do an EndEdit()
> >> on the BindingSource (if you're using one) or whatever the
> >> data source is in order to save the changes to the dataset.
> >> Once you do that, the changes will be there to be propagated
> >> back to the database using the Update command.
> >>
> >> Robin S.
> >> ------------------------------
> >>
> >> <poob***@gmail.com> wrote in
> >> messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
> >>
> >> >I have a VB .NET application that is communicating properly with an
> >> > Access DB. I have a slew of textbox controls bound to a dataset and
> >> > when the application launches, the fields are correctly populated.
> >>
> >> > If someone changes a value in one of the text boxes, I need to have
> >> > a
> >> > button capture the change and commit the update to Access. I know
> >> > I'm
> >> > close, but something is missing. I have a data adapter called:
> >> > OleDbDataAdapter1
> >>
> >> > and a dataset called:
> >> > DsMyMonthlyIncome1
> >>
> >> > My button function is:
> >> > Try
> >> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
> >>
> >> > Catch ex As Exception
> >> > MsgBox(ex.ToString)
> >> > End Try
> >>
> >> > No error occurs, but the changed information in the text field
> >> > never
> >> > gets communicated to the Access DB. Have I not captured the changes
> >> > by
> >> > having the textbox controls bound?
> >>
> >> > I've searched quite a bit today, and not found the information I
> >> > seek.
> >> > I am lost here and appreciate the help.
> >
Author
14 Jan 2007 10:35 PM
RobinS
I don't know how to help you. I use the BindingSource in VB2005,
which is responsible for pushing the data from the controls down
into the underlying datasource. I think the BindingSource component
was new in .Net2.0. Since I went from VB6 to VB2005, I never used
the 2003 version.

I recommend that you repost your question to
microsoft.public.dotnet.languages.vb  and/or
microsoft.public.dotnet.framework.windowsforms.databinding

and specify that you have VB2003. Someone will probably pop up
and help you.

Note that if you post to both groups (and I would), post both of
them at once, so it is cross-posted, and if someone answers in
one group, the answer will show up in both groups.

Sorry I couldn't help you more.
Robin S.
-------------------------
Show quote
"pooba53" <poob***@gmail.com> wrote in message
news:1168699047.984488.127670@51g2000cwl.googlegroups.com...
> VB2003
>
> -Dan
>
> RobinS wrote:
>> Are you doing VB2003 or VB2005?
>>
>> Robin S.
>>
>> <poob***@gmail.com> wrote in message
>> news:1168439073.325426.20060@k58g2000hse.googlegroups.com...
>> > I'm afraid as a newbie, I don't quite understand what you mean. The
>> > data is modified in a textbox. The way I bound the textboxes to
>> > their
>> > Access counterparts was to within the textbox properties, choose
>> > (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly
>> > Net
>> > Income as an example.
>> >
>> > So what item do I call the EndEdit() on? Keep in mind, this is not
>> > a
>> > datagrid, but a textbox.
>> >
>> > I sure appreciate the help.
>> > -Dan
>> >
>> > On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
>> >> When they change the entry, you need to do an EndEdit()
>> >> on the BindingSource (if you're using one) or whatever the
>> >> data source is in order to save the changes to the dataset.
>> >> Once you do that, the changes will be there to be propagated
>> >> back to the database using the Update command.
>> >>
>> >> Robin S.
>> >> ------------------------------
>> >>
>> >> <poob***@gmail.com> wrote in
>> >> messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
>> >>
>> >> >I have a VB .NET application that is communicating properly with
>> >> >an
>> >> > Access DB. I have a slew of textbox controls bound to a dataset
>> >> > and
>> >> > when the application launches, the fields are correctly
>> >> > populated.
>> >>
>> >> > If someone changes a value in one of the text boxes, I need to
>> >> > have
>> >> > a
>> >> > button capture the change and commit the update to Access. I
>> >> > know
>> >> > I'm
>> >> > close, but something is missing. I have a data adapter called:
>> >> > OleDbDataAdapter1
>> >>
>> >> > and a dataset called:
>> >> > DsMyMonthlyIncome1
>> >>
>> >> > My button function is:
>> >> > Try
>> >> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
>> >>
>> >> > Catch ex As Exception
>> >> > MsgBox(ex.ToString)
>> >> > End Try
>> >>
>> >> > No error occurs, but the changed information in the text field
>> >> > never
>> >> > gets communicated to the Access DB. Have I not captured the
>> >> > changes
>> >> > by
>> >> > having the textbox controls bound?
>> >>
>> >> > I've searched quite a bit today, and not found the information I
>> >> > seek.
>> >> > I am lost here and appreciate the help.
>> >
>
Author
15 Jan 2007 5:44 PM
pooba53
No apology necessary. You've been helpful and I thank you :-)

-Dan

RobinS wrote:
Show quote
> I don't know how to help you. I use the BindingSource in VB2005,
> which is responsible for pushing the data from the controls down
> into the underlying datasource. I think the BindingSource component
> was new in .Net2.0. Since I went from VB6 to VB2005, I never used
> the 2003 version.
>
> I recommend that you repost your question to
> microsoft.public.dotnet.languages.vb  and/or
> microsoft.public.dotnet.framework.windowsforms.databinding
>
> and specify that you have VB2003. Someone will probably pop up
> and help you.
>
> Note that if you post to both groups (and I would), post both of
> them at once, so it is cross-posted, and if someone answers in
> one group, the answer will show up in both groups.
>
> Sorry I couldn't help you more.
> Robin S.
> -------------------------
> "pooba53" <poob***@gmail.com> wrote in message
> news:1168699047.984488.127670@51g2000cwl.googlegroups.com...
> > VB2003
> >
> > -Dan
> >
> > RobinS wrote:
> >> Are you doing VB2003 or VB2005?
> >>
> >> Robin S.
> >>
> >> <poob***@gmail.com> wrote in message
> >> news:1168439073.325426.20060@k58g2000hse.googlegroups.com...
> >> > I'm afraid as a newbie, I don't quite understand what you mean. The
> >> > data is modified in a textbox. The way I bound the textboxes to
> >> > their
> >> > Access counterparts was to within the textbox properties, choose
> >> > (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My Monthly
> >> > Net
> >> > Income as an example.
> >> >
> >> > So what item do I call the EndEdit() on? Keep in mind, this is not
> >> > a
> >> > datagrid, but a textbox.
> >> >
> >> > I sure appreciate the help.
> >> > -Dan
> >> >
> >> > On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> >> >> When they change the entry, you need to do an EndEdit()
> >> >> on the BindingSource (if you're using one) or whatever the
> >> >> data source is in order to save the changes to the dataset.
> >> >> Once you do that, the changes will be there to be propagated
> >> >> back to the database using the Update command.
> >> >>
> >> >> Robin S.
> >> >> ------------------------------
> >> >>
> >> >> <poob***@gmail.com> wrote in
> >> >> messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
> >> >>
> >> >> >I have a VB .NET application that is communicating properly with
> >> >> >an
> >> >> > Access DB. I have a slew of textbox controls bound to a dataset
> >> >> > and
> >> >> > when the application launches, the fields are correctly
> >> >> > populated.
> >> >>
> >> >> > If someone changes a value in one of the text boxes, I need to
> >> >> > have
> >> >> > a
> >> >> > button capture the change and commit the update to Access. I
> >> >> > know
> >> >> > I'm
> >> >> > close, but something is missing. I have a data adapter called:
> >> >> > OleDbDataAdapter1
> >> >>
> >> >> > and a dataset called:
> >> >> > DsMyMonthlyIncome1
> >> >>
> >> >> > My button function is:
> >> >> > Try
> >> >> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
> >> >>
> >> >> > Catch ex As Exception
> >> >> > MsgBox(ex.ToString)
> >> >> > End Try
> >> >>
> >> >> > No error occurs, but the changed information in the text field
> >> >> > never
> >> >> > gets communicated to the Access DB. Have I not captured the
> >> >> > changes
> >> >> > by
> >> >> > having the textbox controls bound?
> >> >>
> >> >> > I've searched quite a bit today, and not found the information I
> >> >> > seek.
> >> >> > I am lost here and appreciate the help.
> >> >
> >
Author
15 Jan 2007 6:45 PM
RobinS
I saw your posting in the other newsgroup. You might want to post
an addendum to it stating that you have VB2003 and not VB2005.
Just FYI. Good luck.
Robin S.
---------------------------------
Show quote
"pooba53" <poob***@gmail.com> wrote in message
news:1168883041.162313.53310@11g2000cwr.googlegroups.com...
> No apology necessary. You've been helpful and I thank you :-)
>
> -Dan
>
> RobinS wrote:
>> I don't know how to help you. I use the BindingSource in VB2005,
>> which is responsible for pushing the data from the controls down
>> into the underlying datasource. I think the BindingSource component
>> was new in .Net2.0. Since I went from VB6 to VB2005, I never used
>> the 2003 version.
>>
>> I recommend that you repost your question to
>> microsoft.public.dotnet.languages.vb  and/or
>> microsoft.public.dotnet.framework.windowsforms.databinding
>>
>> and specify that you have VB2003. Someone will probably pop up
>> and help you.
>>
>> Note that if you post to both groups (and I would), post both of
>> them at once, so it is cross-posted, and if someone answers in
>> one group, the answer will show up in both groups.
>>
>> Sorry I couldn't help you more.
>> Robin S.
>> -------------------------
>> "pooba53" <poob***@gmail.com> wrote in message
>> news:1168699047.984488.127670@51g2000cwl.googlegroups.com...
>> > VB2003
>> >
>> > -Dan
>> >
>> > RobinS wrote:
>> >> Are you doing VB2003 or VB2005?
>> >>
>> >> Robin S.
>> >>
>> >> <poob***@gmail.com> wrote in message
>> >> news:1168439073.325426.20060@k58g2000hse.googlegroups.com...
>> >> > I'm afraid as a newbie, I don't quite understand what you mean.
>> >> > The
>> >> > data is modified in a textbox. The way I bound the textboxes to
>> >> > their
>> >> > Access counterparts was to within the textbox properties, choose
>> >> > (Databindings)->Text->DsMyMonthlyIncome1 - Budget Items.My
>> >> > Monthly
>> >> > Net
>> >> > Income as an example.
>> >> >
>> >> > So what item do I call the EndEdit() on? Keep in mind, this is
>> >> > not
>> >> > a
>> >> > datagrid, but a textbox.
>> >> >
>> >> > I sure appreciate the help.
>> >> > -Dan
>> >> >
>> >> > On Jan 9, 10:21 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
>> >> >> When they change the entry, you need to do an EndEdit()
>> >> >> on the BindingSource (if you're using one) or whatever the
>> >> >> data source is in order to save the changes to the dataset.
>> >> >> Once you do that, the changes will be there to be propagated
>> >> >> back to the database using the Update command.
>> >> >>
>> >> >> Robin S.
>> >> >> ------------------------------
>> >> >>
>> >> >> <poob***@gmail.com> wrote in
>> >> >> messagenews:1168397402.974425.8***@p59g2000hsd.googlegroups.com...
>> >> >>
>> >> >> >I have a VB .NET application that is communicating properly
>> >> >> >with
>> >> >> >an
>> >> >> > Access DB. I have a slew of textbox controls bound to a
>> >> >> > dataset
>> >> >> > and
>> >> >> > when the application launches, the fields are correctly
>> >> >> > populated.
>> >> >>
>> >> >> > If someone changes a value in one of the text boxes, I need
>> >> >> > to
>> >> >> > have
>> >> >> > a
>> >> >> > button capture the change and commit the update to Access. I
>> >> >> > know
>> >> >> > I'm
>> >> >> > close, but something is missing. I have a data adapter
>> >> >> > called:
>> >> >> > OleDbDataAdapter1
>> >> >>
>> >> >> > and a dataset called:
>> >> >> > DsMyMonthlyIncome1
>> >> >>
>> >> >> > My button function is:
>> >> >> > Try
>> >> >> > OleDbDataAdapter1.Update(DsMyMonthlyIncome1)
>> >> >>
>> >> >> > Catch ex As Exception
>> >> >> > MsgBox(ex.ToString)
>> >> >> > End Try
>> >> >>
>> >> >> > No error occurs, but the changed information in the text
>> >> >> > field
>> >> >> > never
>> >> >> > gets communicated to the Access DB. Have I not captured the
>> >> >> > changes
>> >> >> > by
>> >> >> > having the textbox controls bound?
>> >> >>
>> >> >> > I've searched quite a bit today, and not found the
>> >> >> > information I
>> >> >> > seek.
>> >> >> > I am lost here and appreciate the help.
>> >> >
>> >
>

AddThis Social Bookmark Button