Paradox Data - trying to use ParadoxDataSet lazarus / 63-Database ---------------------------------------------------------------------- cct · 2020-07-19 13:06 Hello, I am trying to write a console application to strip data from an old Commercial Delphi program tyhat uses Paradox. In years gone by I used the 32bit Microsoft ODBC, but that does not work in a 64bit world. I have started using ParadoxDataSet, and can succesfully get records, but am a loss on how to access the actual data. The documentation is a bit light,and I cannot find any example code. This is with Lazarus 2.0.10 FPC 3.2.0 with TParadoxDataSet 0.2 on Win64 Any pointers? ---------------------------------------------------------------------- howardpc · 2020-07-19 13:40 Have you tried: http://svn.code.sf.net/p/lazarus- ccr/svn/components/tparadoxdataset/demo/ ---------------------------------------------------------------------- wp · 2020-07-19 13:49 I did not get very happy with the paradox dataset that comes with Lazarus, but I don't remember any details. I was more successful with the TParadoxDataset in CCR (which is also available by Online-Package- Manager) (install the lazparadoxpkg which avoids the naming conflict with the package coming with Lazarus). This component is the same that is used by the demo mentioned by howardpc. See the simple documentation on https://wiki.freepascal.org/TParadoxDataSet You may also be interested in my "ParadoxViewer" which is based on this component and allows you to view existing paradox files and export them to SQLite3: https://github.com/wp-xyz/ParadoxViewer ---------------------------------------------------------------------- MarkMLl · 2020-07-19 16:29 If you've already got 32-bit tools for the job, are confident in their use, and have limited time, it might be more practical to work out how to fire up a 32-bit VM on your 64-bit host than to venture into unknown territory. MarkMLl ---------------------------------------------------------------------- cct · 2020-07-19 17:35 @howardpc - thanks I have looked at that, but is isbuilt aroud DBGrid, whuch is not what I am after - I want a console application that can read the data, and probably use it to refresh an SQLite DB. @wp - I am using TParadoxDataSet - I cannot use TParadox, as I am running 64bit. I havew used Paradox Viewer, but will look at the source - many thanks Chris ---------------------------------------------------------------------- cct · 2020-07-19 17:38 @MarkMLl - I no longer have them all, and that route was very manual - I want to automate this completely Chris ---------------------------------------------------------------------- cct · 2020-07-19 19:15 @wp - Looking at your ParadoxViewer, which seemsto provode an excellent template for what I want to do (as well as learning!) but I cannot get it to compile - it is objecting to ParadoxDataset.PrimaryKeyFieldCount - saying member does not exist. I have 0.2 of lazparadoxpkg compiled in Lazarus, and the Project Inspector shows it as required. Am I missing something, or were you using a different version of the package? TIA Chris ---------------------------------------------------------------------- wp · 2020-07-19 20:17 I am using the version from CCR (https://sourceforge.net/p/lazarus- ccr/svn/HEAD/tree/components/tparadoxdataset/). But I just tried also the version from OPM with Laz 2.0.10, and in fact, here is the issue with the PrimaryKeyFieldCount. So, you should get yourself the CCR version, you can use the snapshot if you don't have svn. [EDIT] I prepared a new release (0.2.1) which matches the CCR version and asked for addition to OPM. ---------------------------------------------------------------------- cct · 2020-07-19 23:45 Brilliant - thanks. I will try in the morning Chris ---------------------------------------------------------------------- cct · 2020-07-20 14:19 @wp - many thanks, that works very well. I can now see how to proceed with my plan! Chris