Solved

Paradox Table Versions

Posted on 1999-01-27
9
386 Views
Last Modified: 2010-04-06
I'm wanting to know the differences between Paradox 5 tables and Paradox 7 tables. I've heard that '7 tables have extra indexing facilities, but I don't know what these are. I've noticed that Database Desktop automatically decides what version to use.

I'm hoping to use Corel DatabasePublisher at some point, and it only supports Paradox upto version 5 and dBase upto version 5. How can I force Database Desktop to use version 5. ? Is there anyway to convert a version 7 table to a version 5 table ?
0
Comment
Question by:elkiors
9 Comments
 

Expert Comment

by:forns
ID: 1363590
I'm using Delphi 3 Pro and the Database Desktop lets me select to create tables in "Paradox 5.0 for Windows" format with no problem.
Wich version of Delphi are you using?
0
 

Author Comment

by:elkiors
ID: 1363591
forns:

That really should have been a comment. I'm using D3 Standard. That's not really the point though. What I want to know is what makes version 7 tables different from version 5.

Darren
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1363592
Hi elkiors,

the different is that Paradox7 supports more than one field to an Secondary-Index. I don't know about Corel-DatabasePublisher, but about Corel-Paradox 8 (Not much to invest).
To convert Typ 7 in Typ 5 with Corel-Paradox 8 you can Export the Typ 7 Table to a Typ 5 Table. To Force to create Typ 7 with Corel-Paradox 8 File|New|New Table|Blank here can you select the Typ of the Table.

meikl
0
 

Author Comment

by:elkiors
ID: 1363593
Hi Meikl:

Sorry it's taken so long to respond. I've had a look at exporting P7 tables as version 5 using Paradox 7 and yep, it works ok. The only thing is, it didn't seem to preserve any of my indexes or validation, it just made a new blank table containing the data.

I don't really need to go as far as upgrading to P8. Is it just multi-field SECONDARY indexes that are extra in P7 from P5, or does P5 only support single field PRIMARY indexes as well ? (Why is the help in Paradox 7 and Delphi Database Desktop so useless!)

Is there any way to preserve the index and validation of a table when exporting from P7 to P5 or do you have re-generate things like referential integrity after the export ?

If you can answer to these last few items then please post as an answer rather than a comment so I can award the points, you've been most helpful as usual.

Kind Regards

Darren

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 15

Expert Comment

by:simonet
ID: 1363594
By default, Database Desktop will use the lowest version possible. Depending on the features you need on your table, Database Desktop (I'll call it D.D. from now on) will use a higher version number.

For example, a simple Paradox table, with no 2nd indexes may be a v4 table. However, if you add referential integrity, validity checks, etc, D.D. will ask you if you want to make it a version 7 table. Sometimes, if you don't agree on upgrading the table, the feature may not be added to the table.

Why use v7 instead of v5? Although Paradox tables aren't stable at all, v7 is still far more reliable than versions 5 and 4.

You can move from one version to another by using the Table Utility than can be downloaded from Inprise's site. It will let you upgrade/downgrade the table's version.

However, I do not advise you to use Paradox 5 tables, since version 7 are more reliable.

Please let me know if you do not find the table utility at inprise's site.

Yours,

Alex
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1363595
Hi elkiors,

i see the question is answered, i don't know the tool, which is spoken from. Maybe this tool can be downgrade your tables, including the Validation info.

here is a little delphi-routine example which will downgrade your level 7 tables to level 5, including the indexinformation.

The validation-Information is not available by this except the point that sounds like field must be filled. But the others min,max, default, inputmask must be added by hand.

procedure TForm1.Button1Click(Sender: TObject);
Var
  Records_Copied : Integer;
  I : Integer;
begin
  Table1.FieldDefs.Update;  {Retrieve all Fielddefinitions}
  Table2.FieldDefs.Assign(Table1.FieldDefs); {Copy Fielddefinitions}
  Table2.TableName := 'TheCopy.db';  {Give a Name}
  Table2.TableLevel := 5;            {Give a level }
  Table1.IndexDefs.Update;           {Retrieve all Indexdefinitions}
  Table2.IndexDefs.Assign(Table1.IndexDefs); {Copy Indexdefinitions}
  Table2.CreateTable;                {Create Table}
  Records_Copied := Table2.BatchMove(Table1,BatCopy); {Copy Records }
  For i := 0 to Table1.IndexDefs.Count - 1 do  {BuildIndexes}
    Table2.AddIndex(Table1.IndexDefs.Items[i].Name,
                    Table1.IndexDefs.Items[i].Fields,
                    Table1.IndexDefs.Items[i].Options);
  ShowMessage('Table created! '+IntToStr(Records_Copied)+' Records copied');
end;

meikl
0
 

Author Comment

by:elkiors
ID: 1363596
Simonet:

Hopefully you won't take this as being rude, I notice you've only just logged on to E-E. The thing is, if you read my comments, I'd already promised the points for this q. to Meikl since he had already contributed heavily in earlier comments, which gave me most of the info I needed. Pending the other extra couple of items I needed clarifying, I was more than happy with his input. Needless to say, I'm having to reject your answer so that Meikl can claim the points to which I believe he is entitled. I hope you can see this. However, thanks for the info. that you did include, it does give me an alternative avenue to explore should the need arise. Like I said earlier, Meikl has given all the info I need. But please don't let this put you off from contributing to other questions on this site. your points are noted about P7 being more stable than P5, but unfortuantely, as my original question states, I'm wanting to communicate with Corel Database Publisher which can only read upto P5. I think you'll find most of the community hear most helpful and gracious (as I have tried to be). Good luck on other q's.

Meikl:

Have I let Simonet down gently enough ? Please post your comment again as an answer so we can close the thread. Thanks for the extra piece of coding to rebuild indexes and such like. I clears the whole thing up for me

Looking forward to seeing your name in green.

Darren
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 1363597
well elkiors,

now my name will be green ;-)
a little more info about the indexes in P5.
The primary con go over more fields than one, its only the secondary index, which can in P7 over more than one field.
This feature is helpful if you have a n to n relationship and you will normalize it to an 1 to n relationship with a third table.

Yes, i think you was gentle enough with simonet.

i wish you good luck on your Projects

meikl :-)
0
 

Author Comment

by:elkiors
ID: 1363598
Thanks Meikl,

Nice of you to add the extra info for when we should be using multi-field indexes. I'll be honest, when I'm trying to map a database, I try to get to at least 3rd normal form but try and keep single field primary keys using Autoincrement fields if necessary. Unfortunately, as yet, I'm only a novice, and this may not be the most efficient way of doing things, but for me readability, conciseness are what I try to achieve. I've no doubt, when I finally get the go ahead to redesign the company stock, quote and sales systems I might view things differently.

Kind regards, and thanks for your thoughts

See you on another thread

Darren
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now