Simple Database Question

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Guest

Simple Database Question

Post by Guest »

Hi,

I created a database program that allowed the entry of multiple records, and the option to view these records.

The problem is, that if there are more than 30 or so records, then the program scrolls through them until it reaches the last record. This means that there are records above the screen that can't be seen.

In DOS, you can use "dir /p" in order to view all files, and it stops scrolling until you're ready to see the next lot. Is there a way that this can be done in QBasic?

Thanks for your help.
Guest

Post by Guest »

This is one option:

Code: Select all

A% = MaxLineOfData
b%=1
DO
   YOUR_PRINT_CODE_HERE
   if b% < 22 THEN b%=b%+1
   if b% = 22 THEN INPUT"PRESS ANY KEY TO CONTINUE":b%=1
Loop while b% < a%
Next time, show your code... then it is easier to help out...

grtz
Seb
Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Post by Antoni »

my dirty one-liner

Code: Select all

ln=ln+1:if ln=22 then ln=0:locate 25,1: print "More?";:k$=input$(1):locate ,1:print space$(5);
Guest

Post by Guest »

Even better... thx Antoni
Post Reply