Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Database not Saving issue


Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2004, 07:15 AM
Shryer Shryer is offline
Newcomer
 
Join Date: May 2004
Posts: 2
Default Database not Saving issue


OK, while I have been writing VB code for a while I am still fairly newbie at integrating with databases. Because of this i'm having a problem that I hope you gurus can solve.

I am trying to setup a Data Report to do some custom printing and am having some problems.

Background info:
I have the data report linked to a table in an Access 2k (Jet 4.0) database that contains only 2 records (1 blank and the other containing the data to print). What my program does is populates the table with the data to be printed then it shows the Data Report.

Originally when I tried to display the Report all I got was a blank screen. I fixed this by closing the recordset and re-opening it as Client/Static/ReadOnly (for writing the rs is open as Client/Dynamic/Optimistic). At which point I got the data currently saved in the table to display.

The Problem:
For some reason now, any changes made to the recordset are lost when I close and re-open the recordset.

So far I have tried moving to a different record in the table (thus the need for 2 records), using a BeginTrans/CommitTrans pair, and using rs.Update but none of them seem to work.
Reply With Quote
  #2  
Old 05-06-2004, 09:16 AM
Shurik12 Shurik12 is offline
Steppe Walker

Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

Hi,

It would be nice to see the code where you are tring to update the underlying table.
Without this it's kind of difficult to guess what's going on.

Shurik.
__________________
"A diaper is not like a computer that makes satisfying burbling noises from time to time, hinting at great inner complexity." Malcolm Gladwell

"I'm sitting here completely surrounded by no beer." Onslow, 'Keeping up appearances'
Reply With Quote
  #3  
Old 05-06-2004, 06:31 PM
Shryer Shryer is offline
Newcomer
 
Join Date: May 2004
Posts: 2
Default

Actually I stumbled upon the solution shortly after posting this.

Originally I was copying data into databound controls as a method of inserting the data. I tried copying the data directly (using rs.forms("name") ) and it just started working.

Looks like another reason not to use databound controls.

Thanks for the reply though. It's nice to know there are folks out there who care enough to help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving a picture file to a database SIA Database and Reporting 6 02-05-2004 02:58 AM
Saving array of grid column widths to database? hc99 Database and Reporting 4 01-07-2004 05:22 AM
Files linked to Database Mat_J General 6 06-05-2003 04:31 PM
use Access to close another Access app strBean Word, PowerPoint, Outlook, and Other Office Products 20 12-20-2002 02:47 PM
Database problem for database Guru`s cballe Database and Reporting 5 08-08-2002 02:24 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->