PC Review


Reply
Thread Tools Rate Thread

Cant get database to update

 
 
aasif
Guest
Posts: n/a
 
      30th Jan 2007
Hi all

I have a problem. I update a tablerow, with a new field value, then do
accept changes, but when I restart the app the data is the same

its not that the old data is copied again to the ouput folder as I
actually run from the debug folder, and do not rebuild

Seems the data row changes while the program is running but it doesnt
change the database file, even with acceptchanges() .. any ideas why?

In vb2005 this is

Here is some code : http://rafb.net/p/06uS4t19.html

Any help appreciated thanks

 
Reply With Quote
 
 
 
 
Tom Shelton
Guest
Posts: n/a
 
      30th Jan 2007
On Jan 30, 6:30 am, "aasif" <immortal_sm...@yahoo.co.uk> wrote:
> Hi all
>
> I have a problem. I update a tablerow, with a new field value, then do
> accept changes, but when I restart the app the data is the same
>
> its not that the old data is copied again to the ouput folder as I
> actually run from the debug folder, and do not rebuild
>
> Seems the data row changes while the program is running but it doesnt
> change the database file, even with acceptchanges() .. any ideas why?
>
> In vb2005 this is
>
> Here is some code :http://rafb.net/p/06uS4t19.html
>
> Any help appreciated thanks


A dataset is a disconnected set of data. Calling AcceptChanges only
has an affect on the local data. If you want to persist back to the
datasource, then you need to use the Update method of the DataAdapter.

--
Tom Shelton

 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      30th Jan 2007
On 30 Jan 2007 05:30:08 -0800, "aasif" <(E-Mail Removed)> wrote:

¤ Hi all
¤
¤ I have a problem. I update a tablerow, with a new field value, then do
¤ accept changes, but when I restart the app the data is the same
¤
¤ its not that the old data is copied again to the ouput folder as I
¤ actually run from the debug folder, and do not rebuild
¤
¤ Seems the data row changes while the program is running but it doesnt
¤ change the database file, even with acceptchanges() .. any ideas why?
¤
¤ In vb2005 this is
¤
¤ Here is some code : http://rafb.net/p/06uS4t19.html

I would check out the following FAQ:

http://forums.microsoft.com/MSDN/Sho...27451&SiteID=1


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
aasif
Guest
Posts: n/a
 
      30th Jan 2007
Thanks for the quick replies, I figured it out after reading the MSDN
help for a while, and realised I hadnt tried the adaptor.update()
method, I did and it worked just came here to say its solved.

Sorry for being such a newbie, and many thanks for your replies!

Asif

On 30 Jan, 15:53, "Tom Shelton" <tom_shel...@comcast.net> wrote:
> On Jan 30, 6:30 am, "aasif" <immortal_sm...@yahoo.co.uk> wrote:
>
>
>
> > Hi all

>
> > I have a problem. I update a tablerow, with a new field value, then do
> > accept changes, but when I restart the app the data is the same

>
> > its not that the old data is copied again to the ouput folder as I
> > actually run from the debug folder, and do not rebuild

>
> > Seems the data row changes while the program is running but it doesnt
> > change the database file, even with acceptchanges() .. any ideas why?

>
> > In vb2005 this is

>
> > Here is some code :http://rafb.net/p/06uS4t19.html

>
> > Any help appreciated thanksA dataset is a disconnected set of data. Calling AcceptChanges only

> has an affect on the local data. If you want to persist back to the
> datasource, then you need to use the Update method of the DataAdapter.
>
> --
> Tom Shelton


 
Reply With Quote
 
Tom Shelton
Guest
Posts: n/a
 
      30th Jan 2007
On Jan 30, 9:34 am, "aasif" <immortal_sm...@yahoo.co.uk> wrote:
> Thanks for the quick replies, I figured it out after reading the MSDN
> help for a while, and realised I hadnt tried the adaptor.update()
> method, I did and it worked just came here to say its solved.
>


I'm glad you worked it out.

> Sorry for being such a newbie, and many thanks for your replies!


Don't worry about that... That's what this group is here for!

--
Tom Shelton

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Excel Database via Access Main Database with a script Finnbar Microsoft Excel New Users 2 3rd Nov 2008 07:24 PM
Script to Update a Excel Database whenever a Access Database is mo Finnbar Microsoft Access 5 3rd Nov 2008 06:03 PM
Using Excel as a database and need macro or vba to take data entered on one tab and update the database by adding to the next avail row rjr Microsoft Excel Programming 5 11th Jun 2006 09:43 PM
DATA UPDATE FROM CLIENT SIDE DATABASE TO WEB-SERVER DATABASE http://www.visual-basic-data-mining.net/forum Microsoft Access 0 23rd Sep 2004 03:35 PM
Executing UPDATE SQL command doesnot update the database immediately. Venu Koduru Microsoft Access 1 8th Sep 2003 09:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:58 PM.