Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2009, 03:56 AM
Authorized User
Points: 68, Level: 1
Points: 68, Level: 1 Points: 68, Level: 1 Points: 68, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot show edited rows after a save

Hi All:

Been a long time since last posting.

Have an ACCESS 2003 database of about 3500 records. Using VB2005, Im converting from ACCESS programing to VB. Have been successful in setting up a data screen with a a Binding Navigator to control movement throug the data retrieived with a SELECT Query. Only problem is when I try to modify data rows and save the modified data to the database using the SAVE button on the binding navigator. Code is as follows:

Try
Me.Validate()
Me.CONTLOGBindingSource.EndEdit()
Me.CONTLOGTableAdapter.Update(Me.KtplogDataSet.CONTLOG)
MsgBox(
"Update Successful")
Catch ex As Exception
MsgBox(
"Update Failed")
EndTry

After editing the data fileds and presing the SAVE button, I get the "Update Successful" message, the modified data does not show up in the database file. I checked the copy of the database file in debug folder of the application and find the changes are included in that copy. Yet, the changes are not in the main database file in the application.

Any suggestions on how to correct the situation?

Thanks in advance.

Greenbriar
 
Old January 12th, 2009, 07:49 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Greenbriar,

You say that your database in the debug folder contains the changes that your app made but the main database does not. Are you trying to update two different databases?

I assume that you are using the data components in the toolbox. Make sure that your connection object is pointing to the database that you want to update.

Thearon
 
Old January 13th, 2009, 04:22 PM
Authorized User
Points: 68, Level: 1
Points: 68, Level: 1 Points: 68, Level: 1 Points: 68, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot show edited rows after a save

Theroon:

Tnx for the quick reply to my post.

Just prior to reading your post, I decided to try a reconfiguration by starting a new version of the application I'm developing. When developing the connection string, I got the screen asking if I wnated to copy my db file into the application folder. I responded 'yes' and then read the inforamtion describing the three conditions of the copy. It was then that I learned that what I was experiencing and described in my orginal post was stanadard, i.e., since I elected to copy the file 'always' and I was in the development phase, the changes I made to the db file would be copied to the db file in the debug folder of the application but not cared to db file in the level below it. As long as I was in the application development, the db file in the debug folder would be overwritten to reflect the original file. I have to admit it took a couple of readings of this to sink in and make sense to me. This means that what I thought was a problem was not a problem at all.

Greenbriar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Read CSV file - Save Columns into Rows pintoo BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 August 20th, 2008 09:01 AM
Hide/show rows in a table smi13y XSLT 6 December 28th, 2006 08:48 PM
How to lock particular cell for being edited sunil menghani Excel VBA 7 October 17th, 2006 11:07 PM
how to show a button when save is done noor ASP.NET 1.0 and 1.1 Basics 4 May 9th, 2005 12:49 AM
count or show child table's rows melvik ADO.NET 0 January 22nd, 2004 11:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.