VB.net 2008 Problem properly closing a form.

M

Markei54545

Hi all,

I have a form with a databound datagridview. I close the form using
'me.close'.

Elsewhere I then directly update the SQL data.

If I then return to my form it doesn't reflect the change (unless I
restart the program first).

The form is populated in the load event using
Me.JOBSTableAdapter.Fill(Me.DataSet2.JOBS) but even when this is run
the change isn't reflected.

I presume I must refresh the datasource somehow. Any ideas?

Thanks

Mark
 
J

Jason Keats

Markei54545 said:
Hi all,

I have a form with a databound datagridview. I close the form using
'me.close'.

Elsewhere I then directly update the SQL data.

If I then return to my form it doesn't reflect the change (unless I
restart the program first).

The form is populated in the load event using
Me.JOBSTableAdapter.Fill(Me.DataSet2.JOBS) but even when this is run
the change isn't reflected.

I presume I must refresh the datasource somehow. Any ideas?

Thanks

Mark

You should firstly check that your data has been saved to the database -
using Enterprise Manager, or whatever (you don't say what sort of
database you're using).

Assuming you're not using caching of some kind, then there should be no
reason why you can't fetch a dataset containing recently saved data.

However, you don't say what your datasource is. More details might help
a diagnosis.
 
J

Jason Keats

Markei54545 said:
Hi all,

I have a form with a databound datagridview. I close the form using
'me.close'.

Elsewhere I then directly update the SQL data.

If I then return to my form it doesn't reflect the change (unless I
restart the program first).

The form is populated in the load event using
Me.JOBSTableAdapter.Fill(Me.DataSet2.JOBS) but even when this is run
the change isn't reflected.

I presume I must refresh the datasource somehow. Any ideas?

Thanks

Mark

You should firstly check that your data has been saved to the database -
using Enterprise Manager, or whatever (you don't say what sort of
database you're using).

Assuming you're not using caching of some kind, then there should be no
reason why you can't fetch a dataset containing recently saved data.

However, you don't say what your datasource is. More details might help
a diagnosis.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top