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

x
?
Solved

Paradox Tables (Languages & Exporting)

Posted on 1997-09-30
6
Medium Priority
?
583 Views
Last Modified: 2010-04-04
I'd appreciate it if someone could let me know if there is a way of exporting Paradox table data into some sort of file (comma delimited or otherwise). And then importing that data into another table (with same fields, except a few extra fields appended after the original fields), thus preserving the data.

Also is there a preffered Table Language to set a table to so that users can save Internatonal character data? I'm using Paradox 'ascii' as my Table Language and a user is complaining that it does not save his Greek character data correctly.

Thanks in advance for your help.
Regards,
Demitri (cybersoft@bigfoot.com)
0
Comment
Question by:CyberSoft
[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
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:d4jaj1
ID: 1346620
I know of a easy way to export your table to an ascii file, as well as, import it back.  I don't however have the slightest idea about the Greek part.  If you want me to answer the question - without the greek portion - I will, assuming you will grade it if it works for you.
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 150 total points
ID: 1346621
This is from Lloyd's help file, shows how to export to a text file.
To import from a text file just create a paradox table on the fly or import to an existing table, and write more or less the same code.
In the DataBaseName You can write a directory name, say
DataBaseName:='c:\temp';
I didn't check if this code works.

text tables (ASCII)

Q:  How do I make an ASCII text table from a paradox table?

A:  

procedure TForm1.Button1Click(Sender: TObject);
var
  t1, t2: tTable;  {t1 = PW table; t2 = ASCII version}
begin
  t1 := tTable.create(self);
  with t1 do begin
    DataBaseName := 'DBDEMOS';
    tableName := 'customer.db';
    open;
  end;
  t2 := tTable.create(self);
  with t2 do begin
    DataBaseName := 'DBDEMOS';
    tableName := 'myfile.txt';
    TableType := ttASCII;
    createTable;
    open;
    edit;
    BatchMove(t1, batCopy);
    close;
  end;
  t1.close;

end;

{ This code came from Lloyd's help file! }
0
 
LVL 3

Author Comment

by:CyberSoft
ID: 1346622
Yes of course I will give anyone the points they deserve should they help me with a problem. (Still require help with the Language problem I have with Paradox tables)

The code that ronit posted works great for converting from Paradox ASCII -> DOS Text ASCII

Now when I tried to change the code to convert from the (exported) DOS Text ASCII file to a Paradox ASCII file I received the following error:

Project Project1.exe raised exception class EDBEngineError with message 'Invalid parameter.'  Process stopped.

This happens on the open method of t2 (where the program halts in the code)

I have created an empty database with the same fields required (because all I wanted to do was import the data from the Text ASCII file into the Paradox ASCII table)

Here's what my code looks like for the DOS ASCII -> Paradox ASCII conversion :

// Converts from ASCII text file to Paradox DB Table
procedure TForm1.Button2Click(Sender: TObject);
var
   t1, t2: tTable; {t1 = ASCII; t2 = Paradox}
begin
     t1 := tTable.create(self);
     with t1 do
     begin
          // Open TXT file from current directory
          DataBaseName := '';
          tableName := 'myfile.txt';
          tableType := ttASCII;
          open;
          ShowMessage('Successful TXT file open');
     end;

     t2 := tTable.create(self);
     with t2 do
     begin
          // Save to current directory
          DataBaseName := '';
          tableName := 'myfile.DB';
          TableType := ttParadox;
          createTable;
          Open;
          Edit;
          BatchMove(t1, batCopy);
          close;
          ShowMessage('Successful IMPORT');
     end;

     t1.close;
end;


Thanks for all help.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:ronit051397
ID: 1346623
If you want to copy to a paradox table and this table already exists then try to delete the command createTable;
I think you won't get then the error 'invalid parameter... '
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1346624
About the greek stuff, I think you should do the following:
1. In Delphi3 activate the Bdeadmin.exe which is in
   C:\Program Files\Borland\Common Files\BDE
2. In the configuration page enter the
   Configuration\Drivers\Native\PARADOX
3. Change the property LANGDRIVER from 'ascii' to
   Paradox Greek GR437 and save.

0
 
LVL 3

Author Comment

by:CyberSoft
ID: 1346625
Thanks Ronit - with a few changes it works like a charm now - the conversion and exporting from one table to another.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 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