Recent

Author Topic: [SOLVED] Paradox, anyone using this writting an app or know?  (Read 8188 times)

wp

  • Hero Member
  • *****
  • Posts: 13552
Re: Paradox, anyone using this writting an app or know?
« Reply #15 on: January 08, 2024, 12:14:24 pm »
Basically the objections against dbf are correct. But it has one main advantage: It has no other dependencies, it is pure Pascal, no missing dlls, no 32bit/64 bit issues. Therefore, I'd prefer dbase for small projects over "monsters" such as postgresql, firebird, or even sqlite3.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: Paradox, anyone using this writting an app or know?
« Reply #16 on: January 08, 2024, 02:20:48 pm »
I think that's reasonable, provided that the developer is sufficiently well-informed- and TBH mature- that he can recognise that there's virtually no latitude for piling features on top.

I chose PostgreSQL specifically because I was dealing with large, non-restartable data collection sessions: if something went wrong you had to rewind the transaction and redo in its entirety. And nothing else I could find at the time was both easily accessible (i.e. you didn't need to buy a ten-person license to support ten telemetry modems) and had a robust transaction facility.

-----

Which leads me on to a cautionary tale, inspired by something in today's news.

From the 1980s onwards, large parts of the UK's state-supported computer company ICL were sold off to Fujitsu. Now ICL had long been mandated for academic and government-related business (although this was regularly waived), and as far as I can see this continued for a while despite the fact that the entire "brand" was now Fujitsu. The result of which was that when a contract came up for "computerizing" the country's sub-postoffices (basically franchisees with a special counter in their corner shop) Fujitsu got it: it's now known as Horizon.

The result apparently worked fine when tested by the developers. Unfortunately, when used in the Real World it turned out that if a modem session dropped accounting records would disappear leaving the subpostmaster with a deficit which was his responsibility: around 700 were convicted of fraud.

With a nod to an earlier thread ** , it is quite clear that that was a transaction issue. But it ruined 700 families: some of the people concerned are now dead, and almost all found themselves vilified by their communities.

** https://forum.lazarus.freepascal.org/index.php/topic,63982.msg487501.html#msg487501

Quote
There might be ways of recovering from this and reestablishing the connection, even if the client IP address changes, but I have seen no coherent discussion of this. In any event, this would be unable to reinstate the state of the failed transaction, with the result that the content of the table (on the server) and DB-aware visual controls (on the client) would have to be assumed to be inconsistent.

MarkMLl

MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

egsuh

  • Hero Member
  • *****
  • Posts: 1800
Re: Paradox, anyone using this writting an app or know?
« Reply #17 on: January 09, 2024, 09:11:00 am »
Quote
Basically the objections against dbf are correct. But it has one main advantage: It has no other dependencies, it is pure Pascal, no missing dlls, no 32bit/64 bit issues. Therefore, I'd prefer dbase for small projects over "monsters" such as postgresql, firebird, or even sqlite3.

How can I use this? More exactly, how can I create dbf files?  I cannot create .dbf file from within Lazarus itself.
I found DBF Viewer and it says it can create dbf file, but it does not seem free.  Any other way?

Zvoni

  • Hero Member
  • *****
  • Posts: 3397
Re: Paradox, anyone using this writting an app or know?
« Reply #18 on: January 09, 2024, 09:41:29 am »
How can I use this? More exactly, how can I create dbf files?  I cannot create .dbf file from within Lazarus itself.
I found DBF Viewer and it says it can create dbf file, but it does not seem free.  Any other way?
https://dbeaver.io/about/

EDIT
Quote
Any other way?
OpenOffice/LibreOffice Calc can export to DBF.
Design your table there, and export...?
No Idea about table-Levels
« Last Edit: January 09, 2024, 09:48:59 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

dseligo

  • Hero Member
  • *****
  • Posts: 1686
Re: Paradox, anyone using this writting an app or know?
« Reply #19 on: January 09, 2024, 09:42:52 am »
Quote
Basically the objections against dbf are correct. But it has one main advantage: It has no other dependencies, it is pure Pascal, no missing dlls, no 32bit/64 bit issues. Therefore, I'd prefer dbase for small projects over "monsters" such as postgresql, firebird, or even sqlite3.

How can I use this? More exactly, how can I create dbf files?  I cannot create .dbf file from within Lazarus itself.
I found DBF Viewer and it says it can create dbf file, but it does not seem free.  Any other way?

Open google. Type: lazarus dbf
Click on first result.

Thaddy

  • Hero Member
  • *****
  • Posts: 19249
  • Glad to be alive.
Re: Paradox, anyone using this writting an app or know?
« Reply #20 on: January 09, 2024, 01:25:24 pm »
For both dBase and Paradox there exist odbc drivers. You can use that too.
objects are fine constructs. You can even initialize them with constructors.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: Paradox, anyone using this writting an app or know?
« Reply #21 on: January 09, 2024, 01:48:27 pm »
For both dBase and Paradox there exist odbc drivers. You can use that too.

Agreed, and since I like standards that would normally be my first choice.

/However/, if you do that you will find yourself in deep trouble if one or more database implementations gains some "must have" facility which is slow getting into the ODBC standard.

In my case I had two layers of problem when this happened: a Delphi-built suite on top of BDE on top of ODBC, which would have benefited enormously from being able to get at the backend server's asynchronous notification facility.

It turned out to be virtually impossible to do this with BDE and ODBC in the way: the relevant handles were buried too deeply. But when I started exploring the situation with FPC and the LCL I had very little difficulty, and that was years before there were components for (PostgreSQL and Firebird) async notifications.

So while this might not apply to other development environments, in the case of FPC etc. I'm entirely happy with the abstraction presented by the RTL/FCL. Now I admit that when I was looking at session robustness recently I did have to add one file https://github.com/MarkMLl/testdb/blob/main/pqconnection2.pas in order to expose properties (port numbers etc.) presented by the underlying backend library, but doing this would have been vastly more difficult had there been additional layers in the way.

MarkMLl
« Last Edit: January 09, 2024, 02:54:20 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

egsuh

  • Hero Member
  • *****
  • Posts: 1800
Re: Paradox, anyone using this writting an app or know?
« Reply #22 on: January 10, 2024, 07:35:49 am »
Quote
https://dbeaver.io/about/

DBeaver says it supports DBF, but I cannot create new table there. Anyway I do not definitely need to use dBase, but having another option could be helpful in some cases. Right now, I have to be satified with opening dbase files.

cdbc

  • Hero Member
  • *****
  • Posts: 2808
    • http://www.cdbc.dk
Re: Paradox, anyone using this writting an app or know?
« Reply #23 on: January 10, 2024, 09:06:26 am »
Hi
Use the "TDbf" component that comes with lazarus...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Thaddy

  • Hero Member
  • *****
  • Posts: 19249
  • Glad to be alive.
Re: Paradox, anyone using this writting an app or know?
« Reply #24 on: January 10, 2024, 09:55:19 am »
Hi
Use the "TDbf" component that comes with lazarus...
Regards Benny
Yes, and TDbf can actually create tables and indices. I am not sure the Paradox native component can do that. I used Paradox only around the year 2000 and quickly left using it. Note that for dBase, the "database" is merely a directory that contains the tables. Brings back fond memories about working on PerfectView, used dbf format, with initially proprietary indexing.
« Last Edit: January 10, 2024, 10:00:40 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

avra

  • Hero Member
  • *****
  • Posts: 2590
    • Additional info
Re: Paradox, anyone using this writting an app or know?
« Reply #25 on: January 11, 2024, 08:55:31 pm »
If you really, really have to use DBF or Paradox, then you have to make special care if you also want to use indexes because they can get easily corrupted on unexpected application shutdown.

Back in the old Clipper/dBase/FoxPro days, the last command on app exit was to create zero length like as a flag that application had a regular exit and not power outage. If on app start you find this file then you delete it and proceed startup as normal, but if file did not exist then it meant that there was a high chance that your indexes were corrupted so you reindex your data with some progress indicator displayed to user.

I really recommend that if you want to create a single user application you take a look at sqlite, and for multi user postgresql. There are many other nice options but with these you can't go wrong.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Zvoni

  • Hero Member
  • *****
  • Posts: 3397
Re: Paradox, anyone using this writting an app or know?
« Reply #26 on: January 12, 2024, 08:08:29 am »
I really recommend that if you want to create a single user application you take a look at sqlite, and for multi user postgresql. There are many other nice options but with these you can't go wrong.
Nevermind SQL-Support
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Thaddy

  • Hero Member
  • *****
  • Posts: 19249
  • Glad to be alive.
Re: Paradox, anyone using this writting an app or know?
« Reply #27 on: January 12, 2024, 01:18:13 pm »
Clipper
Horror, can't sleep tonight. I was forced to work with it for six months until I got fed up and quit my job.
My in-depth knowledge of dBase did not help with all those quirks. So I had to tell my employers I actually failed (NOT entirely) and quit on the spot.
If your conscience tells you you are less productive, quit.
Yet another different index format that does not do what you expect.
(Although it was pretty good at building DOS user interfaces.)

I am still convinced that the developers of clipper had no real basis in computer science at all.
« Last Edit: January 12, 2024, 06:23:31 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

avra

  • Hero Member
  • *****
  • Posts: 2590
    • Additional info
Re: Paradox, anyone using this writting an app or know?
« Reply #28 on: January 12, 2024, 04:22:48 pm »
Clipper
Horror, can't sleep tonight.
Hahahaaaa, I fully understand you. FoxPro was much better, and it even had primitive but slow SQL support. The only thing worse then Clipper was dbMAN on Atari ST and Amiga running app from a single bootable diskette. Learned the reindexing trick the hard way. I was so happy when those days have passed.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: Paradox, anyone using this writting an app or know?
« Reply #29 on: January 12, 2024, 10:34:09 pm »
I am still convinced that the developers of clipper had no real basis in computer science at all.

In fairness: when Clipper came out, who had? And if they had, how much useful "Real World" experience had they had time to develop after graduating?

And for that matter, how much basis in Computer Science (as now understood) did SQL have? It obviously had a basis in Codd's ideas (dressed up using fancy terms like "algebra" and "calculus"), but when it was standardised (mostly by IBM) such things were novel and untaught.

There were relatively few people in the early '70s who made any serious attempt to apply theoretical rigour to computing. The outstanding exception to that was Dijkstra, and his opinion of IBM was unprintable.

But the people who worked on Clipper and the rest /did/ have some measure of grounding in commerce, which was probably more useful: I dread to think what would have happened if somebody had attempted to apply any sort of rigorous CS-theoretical approach to the job of building a user interface with a data-handling backend on a '286 computer running DOS.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018