Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FABS - Qbasic
#11
Gracias Bplus.
Aquí está el archivo comprimido.


Attached Files
.rar   FABS.rar (Size: 6.04 KB / Downloads: 67)
Reply
#12
Can you pass me a piece of the code to see how it makes the calls to FABS?

Regarding what you say about the keys of different sizes, when the table is created with the "C" command, it is indicated if the key is numeric or text, how many keys it will have and the length of each one.
In my case I always made them of text and of constant length in each table, if it had more than one key, but we will have to see which is your case.

With the "M" command you can know the length of a specific key:

CMND$ = "M\{FileNo}\{KeyNo}"
File No= File number
KeyNo= Key number
Reply
#13
I will try to post some code later this evening and reread your posts.  I appreciate your help.  Sorry for the delay I don't get to take a look at the site as often as i would like
Reply
#14
sorry it has taken me so long to get back here. Things have been crazy the last couple of months and i havent had time to get back to it. Here is where it is called in the program.


1310 CMND$=",Y,2" : GOSUB 56000
CMND$=",O,PRICHIST.KEY,1" : GOSUB 56000

OPEN "PRICHIST.DAT" FOR RANDOM ACCESS READ WRITE SHARED AS #7 LEN=61
FIELD 7, 18 AS LNPT$, 6 AS INV$, 8 AS DAT$, 25 AS NME$, 4 AS QUAN$ : RETURN



'--------------- Main CALL to FASBP ---------------------------
56000 CALL FABSMB(CMND$,ERRF%,RECNO%,ADRKEY%):RECLOW!=RECNO%
56010 IF RECLOW!< 0 THEN RECLOW!=RECLOW!+65536!
CALL FABSMB("X",DUM%,RECNO%,DUM%):RECHI!=RECNO%
IF RECHI!< 0 THEN RECHI!=RECHI!+65536!
RECNO!=RECHI!*65536+RECLOW!
56020 RETURN
Reply
#15
I have qb45 and a pc running win7 32 bit.   I don't see  a declare statement anywhere in the program does that indicate it was linked to the library?

Thanks again, and sorry for the delay in respose.
Reply
#16
The program links to the FABS library when you open it.
I imagine you'll load QB45 with a BAT file and that's where it links to.
I imagine it will be something like this:
qb/l \FABSMB.LIB (I think that's what the library is called)
Where the "l" command tells you to load the FABSMB.LIB library and where to find it.

With respect to the program example that you have given, the "Y" command with the "2" parameter is used to activate the auto-refresh mode in a local network, so that all computers can access records that one of them has already opened.
The next line opens the key file on channel 1 and the next line opens the linked data file on the same channel.
What do you need to modify in the program?
Reply
#17
(06-15-2022, 08:14 PM)JuanjoGomez Wrote: By the way, I don't know how to attach the program FABS.COM to a post
Oh I'm sorry, didn't see OP's post on second page saying he was on Windows7 32-bit but anyway...

In my experience, running a 16-bit executable file is blocked by Windows10. I tried to run QB.EXE (M$ QuickBasic v4.5) executable once on one of my computers and got one of the fancy cheap dialogs that the OS was unwilling. If it refuses to run a 16-bit EXE file then it would certainly reject a COM file, that's why COMMAND.COM was removed from the OS (and on QB64 as late as v0.98 the code for "SHELL" was still checking for its existence). This probably applies to Windows8 as well.

Loading a Quick Library might be part of the problem, and have to be careful all filenames are 8-dot-3 without spaces because that was 16-bit MS-DOS limitation.

For Vista+ the creators began making it difficult to use MS-DOS apps, maybe making changes to the Windows API, also User Account Control became involved (many things in the past have to be run as administrator which sucked). Might have to go looking for an emulator only so the COM file runs.

EDIT: You might want to look at Freebasic, but read extensively about the MS-DOS mod because it requires a lot of crazy stuff only to make programs created by a 32-bit compiler pretend they are 16-bit. If your BASIC code is straight out of QuickBasic, it might be compiled in "-lang qb" mode without a lot of modifications.
Reply
#18
https://www.freebasic.net/forum/viewforum.php?f=4

I wish those people at least provided a sticky thread explaining clearly if the MS-DOS mod is still being maintained and if it could work in 64-bit. If this is not good enough, then an emulation like DOSBOX might be the solution, and run M$QB like it was remembered in the past. Even better is to somehow find a computer that has WindowsXP or earlier installed and do it that way, only because this project depended on that one COM file as its greatest limitation.

BTW QB64 cannot load Quick Libraries, which is another thing that hinders what the OP might expect. The BASIC source code that was used to compile to QLB has to be made available as $INCLUDE file into QB64 BASIC code.

I was going to propose something else that I never checked out myself which is radical...
Reply
#19
I don't think freebasic is compatible with a program written in QB45 using a database created for MS-DOS, such as FABS.

FABS is a 16-bit program that worked up to Windows 7 32-Bit. In Windows 10 it doesn't work anymore. The version that I have and have used until a couple of years ago was published in 1987, so it has been supported for a long time.

As a result of finding QB64 and being compatible with MariaDB, it has been quite easy for me (although spending a lot of time on it due to the length of my program -currently more than 42,700 lines-) to change it to this language, which has opened up the possibilities of expansion and use in the future.
Reply
#20
The problem that G43 has is that it has errors in the database it uses and it needs help to be able to continue using the program and the data it has on the computers.
Reply




Users browsing this thread: 2 Guest(s)