Recent

Author Topic: Suprising Plea  (Read 1211 times)

J-G

  • Hero Member
  • *****
  • Posts: 959
Suprising Plea
« on: January 29, 2025, 05:34:23 pm »
I haven't been on this forum for quite some time since I haven't written anything  :o

However, I have had a call from an old customer whose ancient PC has died. I say ancient and I really mean that - it was running DOS !!!

He has a second PC which is running Win 98 though, and although I can't recover the hard disc on his old machine I can read some 'Backup' floppy disks and have a DB3 file with names & addresses.

As an 'interesting' excercise I'm about to write a program to extract the data and create at least a .CSV file - though I may go so far at to write him a simple database program which can edit / add to the data recovered.

The question I have is what setting will I need in Lazarus 2.2 to create a program to run under Win 98?  I'm thinking Config & Target  -  or am I on a "Mission Impossible"

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12107
  • FPC developer.
Re: Suprising Plea
« Reply #1 on: January 29, 2025, 05:38:20 pm »
Afaik you need something FPC 2.6.x based to have a chance on running on win9x.

Since FPC 3.0 (2015), unicode related changes necessitated an NT based Windows. 

J-G

  • Hero Member
  • *****
  • Posts: 959
Re: Suprising Plea
« Reply #2 on: January 29, 2025, 05:48:32 pm »
Afaik you need something FPC 2.6.x based to have a chance on running on win9x.

Since FPC 3.0 (2015), unicode related changes necessitated an NT based Windows.

Thanks for that quick responce Marcov.

It is as I suspected of course. I'm naturally using FPC 3.0.0 so I'll just have to content myself with recovering the data that can be read into Excel. The chance of me being able to sell him a new PC is somewhat less than NIL !

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Bart

  • Hero Member
  • *****
  • Posts: 5536
    • Bart en Mariska's Webstek
Re: Suprising Plea
« Reply #3 on: January 29, 2025, 08:37:53 pm »
You can use Lazarus 1.6.2, but built from sources using fpc 2.6.0 (it was released with fpc 3.0.0).
Using this combo, you can write programs for Win9x.
See https://wiki.lazarus.freepascal.org/Version_Numbering.

Bart

MarkMLl

  • Hero Member
  • *****
  • Posts: 8317
Re: Su(r)prising Plea
« Reply #4 on: January 29, 2025, 08:57:48 pm »
Afaik you need something FPC 2.6.x based to have a chance on running on win9x.

Since FPC 3.0 (2015), unicode related changes necessitated an NT based Windows.

Thanks for that quick responce Marcov.

It is as I suspected of course. I'm naturally using FPC 3.0.0 so I'll just have to content myself with recovering the data that can be read into Excel. The chance of me being able to sell him a new PC is somewhat less than NIL !

Hi JG, nice to see you back in circulation. Not even I have a '98 system active, I'd suggest that the "oldest viable" these days is XP (but don't under any circumstances let it go online: apart from the malware risk it might try to get updates from M$ which will definitely nobble it).

FPC 2.6.4 is viable on older systems, which has a very similar feature set to 3.0; I think this will correspond to Lazarus 1.0.14. However I'd suggest that you've got two problems which need to be kept separate: (i) recovering your client's data and (ii) getting them onto a system which is even minimally supportable.

(Noting Bart's comment: I don't know why our FPC <-> Lazarus version is so different.)

If a system was procured during the DOS era then it's on very thin ice: irrespective of whether it's been running or not there's going to be lots of components (electrolytic caps, disc bearings) which are close to failure. You might find it worthwhile trawling eBay for a Dell or HP plus screen and either inducing them to buy it or selling it to them with zero (or slightly negative) profit, although you'd need to consider the OS situation carefully.

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

Zvoni

  • Hero Member
  • *****
  • Posts: 2896
Re: Suprising Plea
« Reply #5 on: January 30, 2025, 08:38:18 am »
If you only want to "read" that db3-file (which my money is on being a SQLite3-Database) and convert it to CSV,
copy that db3 to any "modern" Computer, install DB Browser for SQlite, open the db3 there, go to "File - Export ...".... DONE
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

TRon

  • Hero Member
  • *****
  • Posts: 4139
Re: Suprising Plea
« Reply #6 on: January 30, 2025, 08:47:29 am »
(which my money is on being a SQLite3-Database)
Having mentioned the age of the machine/software I suspect it is dbase. Always fun to figure out these kind of things but nothing that a hex viewer can't solve :)
Today is tomorrow's yesterday.

Zvoni

  • Hero Member
  • *****
  • Posts: 2896
Re: Suprising Plea
« Reply #7 on: January 30, 2025, 09:39:07 am »
(which my money is on being a SQLite3-Database)
Having mentioned the age of the machine/software I suspect it is dbase. Always fun to figure out these kind of things but nothing that a hex viewer can't solve :)
Ahhh.... Crap.
I always forget that blasted dBase.
You're probably right....

EDIT: Though, if it is really dBase, then TS should be able to open that thing with Excel.....
« Last Edit: January 30, 2025, 09:41:17 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

J-G

  • Hero Member
  • *****
  • Posts: 959
Re: Suprising Plea
« Reply #8 on: January 30, 2025, 11:19:34 am »
Well, A 'Flurry' of responses  :D  whilst I've been beavering away creating a program to run on MY system.

Thanks for the 'welcome back' MarkMLI -  I'm not considering any repairs to even the Win 98 unit. If it can't be made to simply 'work' as is then that will also be consigned to the bin.

Further explanations :  The Old Old Old PC is 'deceased' - way beyond recovery, HDD failure. Though it does have a NEW CR2032 battery which can be used to bring new life to the Win 98 PC. The biggest issue I have with that is that I don't have a Com Port Mouse!  and the client didn't bring his (he didn't bring the keyboard either but he went back home to fetch it. Long story!!)

He also brought with him two 'Laptops' - a Toshiba Satelite Pro with Win95 and an ACER with Win Vista - -  I haven't fired either of them up yet.

It looks as though he hasn't got any version of Office (therefore no Excel) on the Win 98 PC.

The real reason for this 'visit' is that I have a wierd issue with the program. The basic creation of the database from the dBase file is fully operational, displaying each of the 1300+ records with [Next] & [Prev] buttons. Adding a button with an [Event] to create a CSV file I'm getting an 'Error: wrong number of parameters specified in call to "Assign" '   this didn't (and doesn't) happen with the same code for the main file - viz:
Code: Pascal  [Select][+][-]
  1. procedure Open_NAD_File;
  2. Var
  3.   n : QWord;
  4.   C : Char;
  5.   Rec : Customer;
  6. begin
  7.   Assign(NAD_FIle,datapath+'Leek_NAD.DTA');
  8.   {$I-} Reset(NAD_file); {$+}
  9.   If IOResult = 0
  10.   then
  11.     begin
  12.       Read_NAD_File;
  13.     end
  14. [...]
  15.  
which is accepted and :
Code: Pascal  [Select][+][-]
  1. procedure TForm1.PrintButClick(Sender: TObject);
  2. Var
  3.   i : QWord;
  4. begin
  5.   Assign(CSV_File,datapath+'Leek_NAD.CSV');
  6.   rewrite(CSV_File);
  7. [...]
  8.  

This makes no sense to me so I'd be grateful for some explanation from wiser minds :)

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 959
Re: Suprising Plea
« Reply #9 on: January 30, 2025, 11:24:54 am »
D'oh!

Panic over - -  I've added SYSTEM. in front of 'assign' and all's well.

I had actually tried that before posting but I omitted the 'dot' and of course it still reported the error  %)
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 959
Re: Suprising Plea
« Reply #10 on: January 30, 2025, 06:30:06 pm »
{Victor Meldrew} - - 
"I don't beleive it!"
{/ Victor Meldrew}

My 'Client' now tells me, after 15 minutes on the phone trying to explain what a '9pin Com Port' Connector looks like (so that he could find the mouse for the Win 98 PC!!!)  - that he's still using the last PC I built for him (some time ago) and that is running Win 10 !!!!

I can't decide whether he's been trying to con me into recovering his data or is just totally 'thick'  ::)  -  mind you, he did have to ask his son to find out what O/S his latest PC is running  >:(
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

 

TinyPortal © 2005-2018