473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

BindingSource is not updated!

Hi all,

I'm quite new to vb 2005 and need some help:

I have 2 forms say formA and formB, formA has a dataset1,
table1adapter & table1bindingsource (backend database is access). It
also has a datagrid1 and a bunch of other controls and they're all
bound to the table1bindingsource. There is no binding navigation on
this formA, the user is allow to navigate using the datagrid1, edit
the data using the controls. If the want to add new record, they have
to click on button1

The button1 on formA, when clicked, formB will show, which also has
dataset1, table1adapter and table1bindingsource and a numbers of
unbound controls which basically allow the user to enter data for the
new record. Once they click on the OK button on formB, I do some
backend checking for the data, if all is well, then I generate the key
for the new record then add the new record into the dataset1 and then
update the database and formB is then closed

The new record is added to the backend database, however, the
table1bindingsource on formA is not refreshed and thus not displayed
on formA after formB is closed.

Any help would be greatly appreciated.

Apr 13 '07 #1
1 2563
You have to understand that your binding sources are not connected to
anything, so they don't know what happens at the database level.

To get these new rows you will have to trigger a tableadapter.Fill.
Presumably you know when a user adds a row in FormB, so just trigger a Fill
at that point.

The concept is completely different that what I am used to as well. I'm not
entirely convinced that this disconneced state is any advantage since all my
clients have < 50 concurrent users with relatively light DB usage. In any
case, it is the way it is!

Another concept that makes no business sense to me is reading an entire
table and filtering the results at the client. For example, when you have an
Orders/OrderDetail relationship. If you have millions of OrderDetail
records it is not practical to load them all into the client and then
filter. So you end up writing more code to only request the rows you need
from the DB which makes the automatic coding that VS can do useless. Again,
it is the way it is!

Rick
<vs******@gmail.comwrote in message
news:11**********************@w1g2000hsg.googlegro ups.com...
Hi all,

I'm quite new to vb 2005 and need some help:

I have 2 forms say formA and formB, formA has a dataset1,
table1adapter & table1bindingsource (backend database is access). It
also has a datagrid1 and a bunch of other controls and they're all
bound to the table1bindingsource. There is no binding navigation on
this formA, the user is allow to navigate using the datagrid1, edit
the data using the controls. If the want to add new record, they have
to click on button1

The button1 on formA, when clicked, formB will show, which also has
dataset1, table1adapter and table1bindingsource and a numbers of
unbound controls which basically allow the user to enter data for the
new record. Once they click on the OK button on formB, I do some
backend checking for the data, if all is well, then I generate the key
for the new record then add the new record into the dataset1 and then
update the database and formB is then closed

The new record is added to the backend database, however, the
table1bindingsource on formA is not refreshed and thus not displayed
on formA after formB is closed.

Any help would be greatly appreciated.

Apr 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
0
by: Geoff | last post by:
Hi folks Calling BindingSource.ResetCurrentItem() is changing the BindingSource.Position in a way I don't understand. If I'm understanding the docs correctly, ResetCurrentItem() should simply...
1
by: Rob Dob | last post by:
Hi, I have both a Customer and a Orders Table, the key field is CustomerID. I also have a DataGridView that uses a BindingSource created using a join between the Customers table and the Orders...
3
by: msnews.microsoft.com | last post by:
Greetings I have a a simple application with 1 form. On my form I use a BindingSource to bind a database table to a "table (gridDataView)" (one in the database, one on my form, 2 different...
2
nev
by: nev | last post by:
I'm trying to learn how to save changes in my BindingSource. What is Me.Validate()? And do I need it everytime I do save the bindingsource? Is this correct? me.validate() '<-- What is this for?...
1
by: Daniel Jeffrey | last post by:
..Net 2.0 VStudio 2005 C# I know this is going to seem like a strange question, as even I am sure I have missed something - but I cant find it. I want a simple event on any of the objects...
1
by: kpresario | last post by:
Hi All, Once we assigned bindingsource to a datatable, is it possible to return BindingSource as a DataTable? If I updated the some record, then i will like to retrieve the DataTable from the...
2
by: jehugaleahsa | last post by:
Hello: I'm working on improving some of our Windows Forms. I have created two user controls that I want to bind to the same BindingSource. I have an overview control that is used just to...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
2
by: TamusJRoyce | last post by:
I am working on a group project where I do not have access to a BindingSource that is being passed through a function. The BindingSource's DataSource is set to a custom IBindingListView Collection....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.