Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lost Records in Paradox 7

Posted on 1998-06-02
5
Medium Priority
?
142 Views
Last Modified: 2010-04-06
Hi there,

What is going on? I am using Delphi 3.02 and Paradox 7 tables.
I append a record to a table and post it, it seems OK. I can append records to my hearts content, filter them, look at them and all seems OK.

I then exit the program and go back in and all the records I have added have gone. I have a table with fields I use to get values for calculating primary keys and all these values have been reset to their original value.

It looks as though I am using a set of temporary tables that vanish when I exit the program.

I am not using cashed updates nor am I using transactions ( that I know of), so what is going on?

Thanks

Chris
0
Comment
Question by:ChrisBerry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:michaue
ID: 1349854
Hi,

When I started working with Delphi I experienced the same problem.  I found that sometimes that happens when I execute my program from within Delphi (For debugging purposes or for a test run).  Some of my update and inserts just got lost.

When you run the program you have written from the EXE without having Delphi open it doesn't do that.  I suppose it is a bug somewhere in Delphi.

Try that and let me know.  If it still doesn't work feel free to discard this answer and we can look at the problem some more.
0
 

Author Comment

by:ChrisBerry
ID: 1349855
I have experienced just what you say but I would like an answer if possible. I would like to reopen the question for now to see if I can get a full answer to the problem, if I don't I will credit you later.

Thanks for the reply.
0
 
LVL 1

Accepted Solution

by:
Marcius earned 200 total points
ID: 1349856
Chris,

This is a common problem. The reason it happens is because when you post data in Paradox, it doesn't get written to disk immediately. Therefore, when you close your program, it disappears without trace.

The solution is an easy one:

In the OnPost event of your dataset, add a call to dbiSaveChanges. This is part of the dbiProcs unit and is not documented anywhere. So:

add dbiProcs to your uses statement

add dbiSaveChanges to your OnPost events.

The problem will magically disappear :)

Alternatively, you can add a procedure in your main form which will take care of all this for you.

uses dbiProcs;

procedure DoIdle(Sender: TObject; var Done: Boolean);
begin
  dbiUseIdleTime;
  Done := true;
end;

Then, add to the form create event:

  Application.OnIdle := DoIdle;

This will then use any application idle time to carry out database maintenance.

I hope this helps.
0
 
LVL 1

Expert Comment

by:michaue
ID: 1349857
Thanks, now I know too ...
0
 

Author Comment

by:ChrisBerry
ID: 1349858
Thanks, this has really been bugging me and others I know. Seem s sort of fundamental and should be documented somewhere.

Chris

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question