Recent

Author Topic: Paradox DataSet  (Read 7624 times)

PatBayford

  • Full Member
  • ***
  • Posts: 125
Paradox DataSet
« on: April 27, 2017, 10:36:30 pm »
Has anybody persuaded this dataset to work on a Windows installation of Lazarus/Free pascal?
Mine suggests it needs a DLL, which I have downloaded and placed in Windows\System32, but the dataset still reports the same error.
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Paradox DataSet
« Reply #1 on: May 02, 2017, 07:40:39 pm »
What tutorial are you following? Please, provide the link to it.
What DLL have you downloaded and why haven't you put it in your applications folder instead of putting it in Windows\System32?
If possible, please make a very small project showing the error and attach it zipped to this thread so we can help you better.

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: Paradox DataSet
« Reply #2 on: May 05, 2017, 04:23:48 am »
valdir - no tutorial, did not see the need - been using Paradox tables in Delphi as long as I've been using Delhpi (about 10 years)
Attached are my project.lpr, unit1.pas files (as text), and a screenshot showing the error, which occurs when I click the active checkbox in the Object Inspector. I'm used to seeing errors here, BUT, they usually relate to the table itself, rather than the engine!!
As to the location of the DLL I started off with it in the Lazarus path, but moved it when I first saw the error, the point being that Windows\System32 should be accessible everywhere. I believe there is still also a copy in the Lazarus directory, which should also be on the path.
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Paradox DataSet
« Reply #3 on: May 05, 2017, 09:32:15 am »

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: Paradox DataSet
« Reply #4 on: May 07, 2017, 05:17:37 am »
Thanks for the info Valdir. I had already seen the topic 3107 - did not seem to help. Perhaps I should explain that I have a large collection of Paradox tables, having been a Paradox user far longer than a Delphi programmer - I go back to Paradox for DOS! Therefore, it seemed sensible to try and re-use these rather than starting from scratch. As as fall-back though, I wrote a quick, and dirty, Delphi app to export all my data as CSV files - yes, I still have access to Delphi, running on Windows XP, via Virtual box, but this is NOT a long term solution. As to my Lazarus, I believe it is the 32-bit version.
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Paradox DataSet
« Reply #5 on: May 07, 2017, 08:37:41 am »
What stops you from migrating your old application in Delphi and Paradox to a new application using Lazarus and a real RDBMS (Relational Database Management System)?
I suggested that you use Firebird as your database solution, but there are several other options.

Importing a Dataset from Delphi
http://forum.lazarus-ide.org/index.php?topic=31363.0
Is Firebird reliable, flexible, robust, or secured enough?
https://forum.lazarus.freepascal.org/index.php?topic=28602.15
What is the Best "Stand Alone" Database for lazarus
http://forum.lazarus.freepascal.org/index.php/topic,33243.15.html
MySql vs Firebird
http://forum.lazarus.freepascal.org/index.php?topic=35150.0
password protected database ?
http://forum.lazarus.freepascal.org/index.php?topic=35914.0

You will get much more help migrating your Delphi + Paradox application to Lazarus + any real RDBMS.
If you decide to migrate your Paradox directory to a Firebird database, I can help you on the first steps.
On this way, my suggestion is to migrate your tables from Paradox to CSV and then from CSV to TSdfDataSet, then to Firebird via TSQLQuery.
http://www.firebirdsql.org/en/documentation/
http://wiki.lazarus.freepascal.org/CSV#SDFDataset
http://wiki.freepascal.org/Working_With_TSQLQuery
http://wiki.freepascal.org/SqlDBHowto
http://wiki.freepascal.org/TSQLQuery

luckylynx

  • New Member
  • *
  • Posts: 19
Re: Paradox DataSet
« Reply #6 on: May 07, 2017, 10:17:50 am »
Hi PatBayford,
I migrated my old Delphi 6 Paradox DB's to Firebird last year and I used a different paradox dataset (tparadox-0.1.zip- look at sorceforge ). That worked fine with the pxlib.dll (from 1.10.2007) in the lazarus directory.
The migration was easy. Just put the paradox dataset and the TSQLQuery on the form. During a loop assign the Paradox data to Firebird  via SQL Insert like

While not DataSourceParadox.DataSet.EOF do
 begin
  ZQueryRKopf.SQL.Text:='INSERT INTO DB (Orderno,Customerno)'+  'VALUES (:F1, :F2);' ;
  ZQueryDB.Params.ParamByName('F1').AsInteger := DataSourceParadox.DataSet.FieldByName('Aufnr').AsInteger;
  ZQueryDB.Params.ParamByName('F2').AsInteger := DataSourceParadox.DataSet.FieldByName('KdNr').AsInteger;
 ZQueryRKopf.ExecSQL; 
end;
    Paradoxdataset1.next;     

I installed the Paradox tpxd 0.7.1 from Sourceforge and got the same Pxliberror. Maybe this is a bug.
Let me know if this solve your problem

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: Paradox DataSet
« Reply #7 on: May 07, 2017, 10:47:13 pm »
Thanks again Valdir - the problem is, I don't have a single application, but quite a large set of them! It's more a question of getting access to the data for new applications, fortunately the CSV file solution has, at least partly, solved that problem. So, I already have steps 1 and 2 of your conversion strategy in palce.
Thank you LuckyLynx for your comments - I have no experience at all with Firebird, but will look at it, as I do need a working RDBMS, and I absolutely hate Access! I will try the tparadox.zip you suggest
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Paradox DataSet
« Reply #8 on: May 08, 2017, 06:56:13 am »
Consider TODBCconnection. Windows has free Paradox and dBase drivers, but 32 bit only.
Specialize a type, not a var.

 

TinyPortal © 2005-2018