VB 2005 - Updating Records

Jaspal

Jas
Local time
Today, 19:26
Joined
Dec 31, 2004
Messages
38
Hi,

I'm currently developing a new application that is an upgrade from a previous access app. Im developing in VB 2005 with the back end on to SQL 2000. i am able to cannect to the database view and scroll through records etc. However, is it possible with VB 2005 to edit the data in that is shown then go to another record and the edited data is committed to the table. This happens in access and would like to able to do the same in VB 2005 without having to use an update button.

Every time i change the data is remains changed until a restart the application, when i restart the app the data is in its original form as if the changes havent committed to the actual table.

I hope this makes sense and that someone has a kind of idea as to help!

Thanks in advance

Jas
 
When using .NET Languages,you will consider treating the DataLayer(SQL Server) and the GUI Layer(Front End) differently. its different from using MS Access because it consists of both Layers so you wont go into so much hastle or do any extra coding.

I dont usually use Data Binding!(My Preference) which you seem to be using, but to solve your problem,i think its better you use the Update Button and use the "Adapter.Update" method. This will commit your changes to the database.Or you can call this method when you are leaving the form or database.
You can also read more about TableAdapters from the link below.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/tableadapters.asp
 
Last edited:

Users who are viewing this thread

Back
Top Bottom