Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Currupt tables after going from 16 to 32 bit

Posted on 2002-06-06
11
Medium Priority
?
153 Views
Last Modified: 2010-04-04
Hello,

We recently upgraded our 16 bit Delphi application to 32 bit for our users.  Each user has 3 Database tables.  
In some instances, after installing the software their tables appear to be corrupt. The users would get "Master record Missing" errors when attempting to add date.

It appears that there are ophen records in the third table. To fix it...we do a query on the table and save it. Then we go into the table via Paradox and delete all the records and then import the saved query. The ophen records are then rejected.

Is there any way to fix this or an easier way to fix it so we aren't bombarded with problems when they all start installing it at once.
0
Comment
Question by:reenie1
[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
  • 5
  • 4
  • 2
11 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 800 total points
ID: 7060043
you could use a simple query like

delete from childtable where master_id not in (select id from mastertable)

not tested

meikl ;-)

0
 
LVL 6

Expert Comment

by:swift99
ID: 7061137
I would be concerned about orphan records.  

One of your processes is performing a partial commit or partial rollback, or possibly the master record delete process is incomplete.  Or, of course, you may simply have exposed a bug in the referential integrity of an earlier version of the BDE.

Cleaning up the data is one thing, but you want to be certain of _why_ the records are orphan before committing to a code release.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061190
>certain of _why_ the records are orphan before
>committing to a code release.

guessing in the earlier release was no referential
integrity implmented

>performing a partial commit or partial rollback

not possible with paradox-tables (no sql server)

meikl ;-)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:swift99
ID: 7061212
> not possible with paradox-tables (no sql server)

meikl: too true.  I've been out of the ISAM world too long.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061220
>I've been out of the ISAM world too long.
i too, but some cases i can remember :-))
0
 
LVL 6

Expert Comment

by:swift99
ID: 7061332
> not possible with paradox-tables (no sql server)

but it is possible that the buffers were not flushed fully when the application terminated ...
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061345
yes, but only by an abnormal abend->means crash
0
 
LVL 6

Expert Comment

by:swift99
ID: 7061356
they must have fixed things in the BDE since I last used it for ISAM work.  I used to have no end of problems if I didn't explicitly call its flush bufers method with paradox tables before closing the app.   :o)
0
 

Author Comment

by:reenie1
ID: 7061785
The strange thing is that the orphan records were dated 1998. We created this system in 99 and users could only add years from 1999 and up (the year is part of the key)
We did not allow them to add detail records without a master record for any particular year.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7061887
seems something went wrong with the 16 bit app,
maybe the user adds master and details for 1998 by mistake
and then the user deletes the master-record

is this possible in the old app?

meikl ;-)
0
 

Author Comment

by:reenie1
ID: 7063102
I wasn't sure who to award points to but I guess since you were the first and i'll have to delete the masterless children..you get the points.

I think you were all correct in that there were referential integrity problems in the prior version because i now remember some users lost master records..and when they were readded, the child records showed up. So apparently the children remained in the table even thought the parent was gone.

Thanks everyone.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

636 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