What is a .DB file (SOLVED) lazarus / 63-Database ---------------------------------------------------------------------- 1HuntnMan · 2023-09-25 13:36 Hi all! Hoping someone may have an answer to this. I was a programmer back in the 1980's & early 1990's developing database software for the personnel placement industry. I wrote software first in Clipper then migrated to Delphi 5 and the Delphi 7. I'm old so can't remember well but converting a system I wrote in Delphi 7 to a Photo Mgt. Tracking System. My issue is that I would like to convert some of the data files from back then to TDBF or SQL- Lite.  The database files have extensions of .DB, .PX, .XG0, .XG1, .YG0, YG1 and .MB.  Would anyone know how to access these types of files? I assume the .DB files is the database file and the others (.XG0, YG1, etc.) are index definitions. I'm only interested in the data structures not the data... Tks anyone! Donald ---------------------------------------------------------------------- Zvoni · 2023-09-25 13:42 I'd first try to open those files with a DBF-FileViewer-Tool (whichever one). --> https://dbeaver.io/about/ Just to make sure, that it is a valid DBF ---------------------------------------------------------------------- alpine · 2023-09-25 13:43 Paradox DB? ---------------------------------------------------------------------- Zvoni · 2023-09-25 13:55 Another way would be to just try and import it to Excel https://support.microsoft.com/en-us/office/link-to-or-import-from- dbase-f0900e08-b230-482d-b97c-235f154c1284 ---------------------------------------------------------------------- dseligo · 2023-09-25 13:58 Quote from: alpine on September 25, 2023, 03:43:03 pmParadox DB? I also think it is Paradox. Delphi included Database Desktop application for managing tables and data. There was also BDE Admin tool. OP is correct about extensions: In .db files was data, .px was primary index, and if I recall correctly in .mb files was BLOB's and large texts. ---------------------------------------------------------------------- alpine · 2023-09-25 14:06 Quote from: dseligo on September 25, 2023, 03:58:23 pmQuote from: alpine on September 25, 2023, 03:43:03 pmParadox DB? I also think it is Paradox. Delphi included Database Desktop application for managing tables and data. There was also BDE Admin tool. OP is correct about extensions: In .db files was data, .px was primary index, and if I recall correctly in .mb files was BLOB's and large texts. Then maybe DBeaver https://github.com/dbeaver/dbeaver/wiki/Database- drivers combined with a jdbc driver https://github.com/leonhad/paradoxdriver ? ---------------------------------------------------------------------- Zvoni · 2023-09-25 14:08 Quote from: alpine on September 25, 2023, 03:43:03 pmParadox DB? Isn't Paradox a SubSet of DBase? ---------------------------------------------------------------------- alpine · 2023-09-25 15:05 Quote from: Zvoni on September 25, 2023, 04:08:31 pmQuote from: alpine on September 25, 2023, 03:43:03 pmParadox DB? Isn't Paradox a SubSet of DBase? Nope. They were competing products, Borland acquired them both circa 1992. ---------------------------------------------------------------------- 1HuntnMan · 2023-09-25 15:06 I guess that they are Paradox.  I've tried opening a few of the .DB files with Access, Excel, DBF Manager, Note++, etc.  None will open them except NotePad++.  But, I designed these systems with Delphi 7 and can't remember what tool I used to create the data files. It wasn't Paradox, I have never used Paradox and never had it on any of my computers back then. I'm giving up on this, not that important.  I was just interested in the data structures, not the data.  I'm just going to design this system with dbase or SQLite.  This app isn't meant to be a multi-user system for a company or lots of users. I'm just building this little app for a friend who is a fellow photographer for use by him and other photographers who may want to use it to track their photography endeavors whether they photograph weddings, landscapes, street scenes, etc., etc. Tks all for sharing and have great week, life is good if you make it so... Donald aka 1HuntnMan PS: I attempted to attach a small Contacts.DB file and Lazarus doesn't allow, Hello, LOL! ---------------------------------------------------------------------- marcov · 2023-09-25 15:13 Copy it onto a Linux system and use the "file" command on it. ---------------------------------------------------------------------- alpine · 2023-09-25 15:39 Quote from: 1HuntnMan on September 25, 2023, 05:06:16 pmI'm just going to design this system with dbase or SQLite. SQLite strongly recommended. Besides, it will be quite easy I guess for somebody with DataDesktop installed to dump for you the db schema of the files. IMO a lot of people keep the Delphi7 at hand. ---------------------------------------------------------------------- wp · 2023-09-25 16:54 On my github you can find a "ParadoxViewer" which uses the TParadoxDataset from the Lazarus Code and Component Repository (the needed unit is included in the Paradoxviewer - no need to install anything). Besides viewing Paradox files you can also export them to sqlite3. (But note that the program is not heavily tested, I considered it mainly as a test bed for TParadoxDataset) ---------------------------------------------------------------------- 1HuntnMan · 2023-09-25 19:41 WP,    First of all, thanks for your reply!  Okay, I'll download the "Paradox Viewer" you mentioned and give it a try. I must of been using some tool in Delphi 7 to create these data files. It's been years since I programmed.  This old system was a Membership Mgt. system for Realtors I programmed back in 1997.  If the Paradox Viewer works or not, I'll get back to you. Take care, Donald aka 1HuntnMan ---------------------------------------------------------------------- wp · 2023-09-25 21:17 Quote from: wp on September 25, 2023, 06:54:56 pmno need to install anything Sorry - this is not quite correct because the sqlite3 export requires the corresponding dlls. If you don't have them get them from https://www.sqlite.org/download.html. Choose the correct bitness! Assuming that you are on windows, if your Lazarus is 64 bit, choose https://www.sqlite.org/2023/sqlite-dll-win64-x64-3430100.zip, in case of 32-bit you need https://www.sqlite.org/2023/sqlite-dll- win32-x86-3430100.zip. Unpack the download into the folder which contains the exe file of the paradox viewer. (Or if you are brave, unzip the 64-bit download into c:\windows\system32, and the 32-bit download into c:\windows\syswow64 - the exchanged "32" and "64" are not typos!) ---------------------------------------------------------------------- 1HuntnMan · 2023-10-03 13:19 I figured this all out. I can load all or any of these .DB files that I used for all my old Delphi 7 apps with a small app called Paradox Editor.  But, read ing several Lazarus Tutorials, I've seen a image of the Data Access components that included Paradox. But, I have the latest version of Lazarus and that component isn't installed in the Data Access tab. So, found the component for Paradox but can't install it, doing something wrong. If anyone knows any documentation on how to do this properly, please let me know. Tks in advance, Donald aka 1HuntnMan ---------------------------------------------------------------------- TRon · 2023-10-03 13:29 Quote from: 1HuntnMan on October 03, 2023, 03:19:08 pm... But, read ing several Lazarus Tutorials, I've seen a image of the Data Access components that included Paradox. But, I have the latest version of Lazarus and that component isn't installed in the Data Access tab. So, found the component for Paradox but can't install it, doing something wrong. If anyone knows any documentation on how to do this properly, please let me know. Did you meant this ? In case it is then it is included in OPM. OPen OPM, click, click, some other click, wait for Lazarus to rebuild, done. Pictures and instructions are in posted wiki link (*). edit: (*) this section of the link to OPM in particular. ---------------------------------------------------------------------- wp · 2023-10-03 14:13 As far as I know there are two packages for accessing Paradox files: lazParadox: Comes with Lazarus (in folder "components/paradox"). To install, go to "Package" > "Install/Uninstall packages", select "lazparadox" in the right list, click "Install selection", then "Save and rebuild IDE". After some time the IDE should restart and you have the component on the "Data Access" palette. BUT be warned: This package depends in a very intimate way on an external dll - absolutely read the README in the package folder. If this dll is not available your IDE will not start any more! I do not recommend to install this package unless your are experienced enough to handle the situation.TParadoxDataset: install is as TRon described. It is working without external dependencies, and in fact it is used in the paradox viewer that I posted above. A BUT here as well: This component is read-only and has some limitations (IIRC no index support). It is good for reading old Paradox file to convert them to newer database formats, but you cannot edit the Paradox files. ---------------------------------------------------------------------- 1HuntnMan · 2023-10-29 20:02 I'll forget the lasParadox & the TParadoxDataset components install. Not worth the risk of messing up the IDE. Thanks. My motivation was to import some projects I wrote in Delphi 7 many years ago and attempt to import one but it's not worth it. Just printing out old code and using as a guide to do things currently in Lazarus. Thanks ---------------------------------------------------------------------- 1HuntnMan · 2023-11-01 21:09 That's all folks... I downloaded the PdxEditor mentioned and using that app to open up all these Delphi 7 Paradox tables and printing out the structures so I can create the corresponding Dbf tables.