• Print

Author Topic: QBDbase v1.4  (Read 2217 times)

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #15 on: October 01, 2012, 06:52:55 PM »
*************

And for now, that's all I've got to share.   Let's give people time to download it, try it out, and see what and where there might be problems to fix, or features someone wants added.   Any and all feedback is appreciated. 

I *think* it's pretty error free, but that might simply be because I wrote it.   One thing I've learned in coding -- just because it works for the programmer doesn't mean it'll work for everyone else.  It's amazing how many times people will find key-combos and bugs that you never imagine programming traps for.   

"Give me a number:"   
"Twenty-seven"   
"Why didn't that work?"

 ;D

Any and all feedback will be used later.  THIS, is the simple version of a bigger project I envision over the next several months.   I want to expand it to allow User defined fields (think a type within a type), variable length data  (temp$ verses temp AS string * 20), and auto-fields (think of automatic Last Opened, Number of times Accessed, ect...).

I also want to fix the CSV2QBD to be more powerful and reliable, while also expanding our export abilities into a few other native formats:   Tab-separated-fields, Dbase DBF format, and maybe others as well.     

It's why I labeled this version 1.0.   I'm honestly hoping we'll see some nice upgraded version of it in the future.

(Once Galleon allows for optional parameters, I want to expand the routines to accept not just one number, but a range of numbers.   DeleteData x, 1, 10 -- would delete records 1- 10.   

It's not fixed that way at this moment, since I simply wanted to keep as simple as possible.   Later though, as QB64 grows, I hope this little data-manager will grow and expand with it.  ;)

But for now, I'm done!    Try it!  Enjoy it!   I hope others find this as useful as I believe I will. 
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #16 on: October 02, 2012, 05:17:15 AM »
I guess I lied when I said I was finished.   Sorry.

UPDATE  #1!!

************************************************
************************************************

When posting the walk-through, I noticed that there was a few things missing that other people might like, so I added a few more Functions.

QBDRecordsMax&  (dataref#)
QBDRecordsUsed& (dataref#)
SetQDBRecordsMax (dataref#, MaxRecord#)

Usage is simple:
mr = QBDRecordsMax& (x)   <--  This will give us the max limit of our database with reference x
nr =  QBDRecordsUsed& (x)  <-- This will give us the numbers of records used in our database with reference x

SetQBDRecordsMax x, 123456 <---- This will set our max records to 123456. 

NOTE:  SetQBDRecordsMax does NOT close and reopen our database, nor does it immediately make any changes to our mem blocks.  It sets the scene so that the NEXT TIME the database is open, it will reserve the amount of memory necessary to run with the new limit. 

If you need to change the limit immediately, close the database and reopen it after the call.   I'm sorry, but due to the limits of _MEM, it's not something that can be done from inside a sub.  Once we close the database, we need to re-link it to a variable, and we won't know what  the user's variables are that they choose for themselves.

So either:
SetQBDRecordsMax , keep working, and see the change the next time you load the database

OR..

SetQBDRecordsMax...
CloseData...
TypeMem(#) = variable
x = OpenData...


*******************************************
*******************************************

Also, a note here for people who have read this whole mess through already:
I changed the global variable Encrypted to QBDEncrypted.   It works the same as before, but with a new name a little closer to our naming standard, and less likely to ever conflict with a user's variables.
« Last Edit: October 15, 2012, 05:57:07 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #17 on: October 03, 2012, 12:27:00 PM »
I've been working on getting a better set of documentation and a tutorial wrote up for this library, to make it simplier and easier to understand and use.

The start of that guide and tutorial has now been uploaded in the first post.  I've got quite a bit to add to it, but I thought I'd go ahead and share what's been accomplished, in case it'd help anyone at all with using the QBDbase Library.

Over the next several days, I'll add to the Guide and finish fleshing it out for complete use.  At the moment though, life calls me away from my work, so I don't think I'll get to add any more to it this evening or tonight.  Look at it, see if it's in an easy to use format, and let me know if you think there's any changes which need to be made.

Enjoy.  :)
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #18 on: October 03, 2012, 10:57:41 PM »
The guide is now REALLY finished, and up on the first post in Word 2010 format.

I was lazy and didn't bother to print up a tutorial -- I wrote one here for goodness sake!  Just start at the first post in this topic and follow the instructions from there to here and you're all set to go -- and the forums even have built in code boxes for easy copying!! 

Personally though, I think that between the guide, in code comments and remarks, and the walk-through posted here, that no one should have an issue using this library.  It's quite powerful, but still quite easy to comprehend.  :)

Now, to just wait for others to try it and offer feedback on it.  I'm dying to see how it'll work for other people with their own projects.  Personally, I'm hoping this can become a standard method for data management that people will come to use with QB64.  I know it's definitely something I'm going to be incorporating into my work from now on.  :D


Edit: You guys should be happy my wife is a pain in the rear.  She thought I should keep all the documentation in one nice file, instead of in the topic here, and in the guide document as well.   Well, after a nag, nag, nag, nag, nag, ALL RIGHT!! ALL READY!  I'LL FIX IT!, the Guide and Tutorial is now all together on the first page in one easy to reference and/or print file.

But unless someone finds bugs, errors, typos, or mistakes -- or unless I get inspired with a new set of commands/functions -- the guide is FINISHED and complete now.  Take it, and enjoy it.  OH, and the wife says if you can e-mail pictures of girls in swimsuits (swimsuits optional) to me, someone should e-mail her pictures of guys lifting weights (weights optional)!

lmcneill@swva.net 

Go ahead, have fun.  Send her ugly men pictures, spam, and annoying political posts.  You have my permission to pester her all you want.  ;)
« Last Edit: October 04, 2012, 11:19:00 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #19 on: October 07, 2012, 08:15:03 AM »
Minor Bug:

Ok guys, I know several people have downloaded this, but I have found one minor bug which needs to be addressed, but I'm not going to re-upload everything for this one little change.   Take the copy where you've downloaded, open DataLibraryF.BM in QB64, and go to the very end of the file.  (Ignore warnings.  QB64 is looking for shared names and they're in the other half of the library.

At the very bottom is this function:

Code: [Select]
FUNCTION O2L~&& (Offset AS _OFFSET)
DIM m AS _MEM
m = _MEMNEW(8)
_MEMPUT m, m.OFFSET, Offset
_MEMGET m, m.OFFSET, O2L~&&
END FUNCTION

What it's missing is one little line, which you need to manually insert.  Put the following in before the END FUNCTION:

Code: [Select]
_MEMFREE m
The final function should look like:
Code: [Select]
FUNCTION O2L~&& (Offset AS _OFFSET)
DIM m AS _MEM
m = _MEMNEW(8)
_MEMPUT m, m.OFFSET, Offset
_MEMGET m, m.OFFSET, O2L~&&
_MEMFREE m
END FUNCTION


It's a very minor thing, but it's a memory leak that needs to be addressed.  (All of 8 bytes a time, and it only hits when using certain commands, so I doubt anyone would ever notice....)  I just don't think it's such an important change that it warrants a whole new download.  Some people are on dial-up or have limited data plans, and it just wouldn't be right to them to make them waste bandwidth for something so trivial.  :)
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

OlDosLover

  • Hero Member
  • *****
  • Posts: 3860
  • OlDosLover
    • Email
Re: QBDbase v1.0
« Reply #20 on: October 07, 2012, 08:30:16 AM »
Hi all,
    Not that i have anything to add to your fine idea and post but instead would like to thank you and encourage you as im sure one day i will use this QBDbase.
OlDosLover.

Clippy

  • Hero Member
  • *****
  • Posts: 16440
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: QBDbase v1.0
« Reply #21 on: October 07, 2012, 02:46:43 PM »
Quote
I'm not going to re-upload everything for this one little change.   Take the copy where you've downloaded, open DataLibraryF.BM in QB64, and go to the very end of the file.  (Ignore warnings.  QB64 is looking for shared names and they're in the other half of the library.

So You are going to make everybody edit your program and get harassed by warnings? That's not conservative... ;D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.0
« Reply #22 on: October 07, 2012, 06:55:31 PM »
UPDATE:
I went in and fixed the memory leak in the main library.
Updated the MakeQBD code and exe so that it'll print a slightly more friendly BAS code output.
Updated the CSV2QBD code and exe so that it now asks you to assign it header information, in case one isn't in the beginning of your CSV file.   
Packaged all the files together into one single rar file for ease of future downloading and updating.

Nothing changed in the data structure or anything extreme.  Only the mem leak was fixed in the main library.  The other two are external helper programs which aren't necessary for running.   If you downloaded the old version, and don't plan on importing txt files into QBD format, and are comfortable manually making the databases, you don't need this update.  Just make the change I illustrated before, and you're still good to go.

I just figured that since the two helper files had gotten an update for ease of use, and since the main code got a minor tweak, all of them combined was worth a new upload.  :)
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

Clippy

  • Hero Member
  • *****
  • Posts: 16440
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: QBDbase v1.01
« Reply #23 on: October 07, 2012, 07:03:24 PM »
Chances are you'll be updating again some day. Good programs are never finished...
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.01
« Reply #24 on: October 07, 2012, 07:35:58 PM »
Aye.  Already got some things I want to update sometime.  A new sub to alter, add, delete password would be nice.  As it is now, you set a password once when making the QBD file and that's it. 

I also want to expand it to have an ExportCode routine which you can use to get the BAS code needed to easily interact with any QBD file, so they'll be easily portable for different users. --FINISHED

And more export options.  Tab separated files, user defined separation,-- FINISHED,  DBASE files...

More import options added to the import wizard as well....

Support for a few extra data types (date, time, and user defined fields)... -- FINISHED

And eventual support for variable length strings.
« Last Edit: November 01, 2012, 07:30:45 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.02
« Reply #25 on: October 08, 2012, 02:01:58 AM »
Update v1.02:


Credit goes to JG for helping with this quick update.  He's been using QBDbase, and noticed several items in the CSVtoQBD addon which needed addressing for ease of use.

Things like:
Quote
PRINT #2, "file$ = "; file$ 'our original statement
PRINT #2, "file$ = "; file$ + ".qbD" 'need to fix this   jg       Plus quotes around fn 

Our output would print file$ = Bob's Database.    It needed to print file$ = "Bob's database.QBD"

He found a lot of little tweaks which needed to be addressed so you could just take the output file and use it as a core to start coding on.  I've made the changes he recommended -- with the exception of adding the password routines.  I wanted to keep those separate so that people will use their own method.  It kind of defeats the purpose of a secret decoder ring, if everyone else has the same one too.  No offense to JG intended.  He's more than welcome to tweak the code to auto-use any subroutines he wants.  It's why I'm putting it out as completely open source, freeware.  I encourage each individual to use it, abuse it, and alter it however is needed to get it to do what they want it to for them.  :)

Personally, I want to thank JG for his interest in the project.  It's nice to know that someone is taking it and using it for their own projects, and that they can understand the source good enough to go in and help debug small issues like this.  My hat's off to ya, JG.  It's hard sometimes to debug our own code.  To debug someone else's takes a whole greater level of understanding.  Many thanks for the assistance here.  I'm hoping to make these little converters more powerful in the future, and easy enough to use that someone rather newish to BASIC could just sit down, give them a go, and be up and running with them.

Every little tweak like this makes that idea more possible.  :D

*****************

(JG -- I tried to email you back, but yahoo says the mail account you sent your email to me from, doesn't exist.  LOL!  Go Yahoo! 

I didn't make the changes you suggested to the file$ either, but I think I know where you'd want to change the code for yourself.  Down on line 258 (for me), it asks:

Code: [Select]
PRINT "What to save the converted file as? :";
INPUT file$

Here, I assumed that a user would enter the file as Path\Name.Extension.  It seems that your problem with the rest of the code is that you're entering it as Name.   

So, where I assumed it'd be C:\QB64\mydata.qbd, you're entering it as mydata -- which is fine.  You're assuming an automatic QBD extension.  I allowed for user flexibility.   Easy fix is either to enter your file$ as mydata.qbd OR go in right after this and set file$ = file$ + ".QBD".  I think that'll fix the rest of the problems you had with extensions not working properly.  ;)

I guess I really need to go in and add some more error-checking to these side routines.  It should check to see if an extension is added (if not ask for one or add .QBD automatically), see if the file already exists (prompt for overwrite or rename), and make certain that the path is a valid place for a user to write to.

As it is though, I think either enter the name with an extension at the moment, or just adding one afterwards automatically will fix all those extension bugs you mentioned in your output and filenames.  ;) )

*****************************

NOTE:  I also went in and addressed these same issues for the MakeQBD wizard.  Hopefully I fixed all the little output formatting so that it's ready for use now without someone else having to debug it as well.
« Last Edit: October 08, 2012, 02:49:30 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.02
« Reply #26 on: October 08, 2012, 07:28:57 AM »
Update v1.02a

Did a little more tweaking to the CSV2QBD file.  Also did a little tweaking to the sample CSV file I'd uploaded in the sample area forums.  It's no wonder people were having trouble converting it, I uploaded the original and not an edited copy of the data file.  The original airport.txt was a CSV file which I downloaded from the net with all the international airport names and information.  Unfortunately, it didn't completely play nice with QB64 INPUT # commands.

There were airports with names like "Big Rock Airport "Lonely Trails Airport", "Lonesome Airport"", which throws QB64 input all to heck.  That's 1 airport with 2 nicknames, but QB64 reads the first quote as a name, then at the comma, wants to read another field -- which makes all fields from that point onwards shift off.

I've went in and corrected the airport.txt file to replace the few extra " with ', which QB64 INPUT has no issues with.  You should now be able to run the CSV2QBD file, and let it look at the airport file, analyze it, and toss you out a working set of QB64 code which you can then run and start converting/accessing that data as a QBD format file.

I've tweaked a few other little things in the code (changed FOR... NEXT to a DO... LOOP UNTIL EOF, in case the original changes in length after you've scanned it.), and fixed where I was testing the auto-detection of the header (I remarked it out while code testing, and it was ALWAYS wanting you to input a header! I forgot to change it back.)

The airport.txt file has 18 fields, 44,000+ records, and is a good demonstration of how the CSV import wizard should work.  Of course, the CSV file has to follow the correct rules and not just toss extra quotes and commas and who knows what all in the middle of it like this one did...  (Well, it had issues in 3 or maybe 4 files total. It was formatted 99% correctly - it was just that last 1% that got our data fields off.)

(A personal apology for all the little updates.  Sometimes when fixing one issue, you make another.  That's kind of what happened in this case, when I tweaked it to allow for a manual insertion of a header...)

Edit:  Also cleaned up some other useless information in the file.  It had stuff in there that I was using to help me when I was debugging - which would be only specific to a few data files on my hard drive and worthless to the rest of the world.  I got rid of that, and cut out a few hundred lines of code which no one else should ever have to try to figure out.  I'm REALLY impressed with  JG's debugging skills.  He managed to sort past the useless information, that really did nothing for anyone but me except obfuscate the code, and he still managed to point out several things that needed tweaking.

NOTE:  All these little tweaks and bug-hunts are in the CSV2QBD file, and don't affect the main library in anyway.  There was a reason why I wanted a completely independent convertor, and this is it.  Conversion can be a pain, and lots of things can need adjusting...  I certainly didn't want to break the main library just trying to import in a text file, so it's an independent  process and bugs (and unfortunately updates) seldom run back and forth in both directions without some manual adjustments.

I really think this has the CSV convertor working much better now, and the code is much cleaner.  Try it out and let me know if it blows up for you.   (I did notice that the overwrite routine for an existing QBD file of the same name needs a little tweak.  It's going to the beginning of the program again and it shouldn't here.  I'll look into that later.  For now, just make certain that you don't overwrite an existing QBD file - unless you want to redo the import procedure from start.  :P )
« Last Edit: October 08, 2012, 08:03:45 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.1
« Reply #27 on: October 08, 2012, 11:15:50 PM »
Update v1.1:

Added the ability for the user to choose custom data separators in the export data routine, and a new global variable.

QBDExportDelimiter is a single string character, which we use to separate data fields in our custom data export mode (Mode 7).  No longer are you limited by CSV files (Comma Separated Value), now you can produce TSV (Tab Separated Value) files, and/or custom separation files.   

Working with data over the years, I've seen all sorts of seperators:   Comma, tab, space (usually for just number files), semi-colon, tilde, pipe...   Set this variable to what you'd like, and you can export in the format you want so that another program can read your QBD information.

Use is:
QBDExportDelimiter = ";"   (for semi-colon seperated fields)
ExportData x, 7, file$   (database reference, export mode 7, file$ to export out)

Version has now become 1.1, as I see this ability stepping us up towards what I envision in v2.0 as I explained in a post to clippy a few messages back.  :)

Updated in this release:
DataLibraryH.BI  -- includes the new global variable
DataLibraryF.BM -- changes the export routine to use our new mode and variable
QBD Guide         -- update to the documentation to include the new export mode and variable.

I really didn't think I'd get to expand any abilities for QBDbase for quite a while, but I thought of how simple this change would be while watching a very boring teen movie on TV with my daughter, and figured I'd fix it while the idea was fresh in my head.  Try it out, and enjoy!   (And if anyone finds any bugs anywhere, or has any problems let me know.  I'll do my best to go in and correct issues as they pop up.  ) 

« Last Edit: October 09, 2012, 02:53:11 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.1
« Reply #28 on: October 14, 2012, 02:22:21 PM »
IMPORTANT LIBRARY NOTE:

When using this library, be certain to run it in something other than SCREEN 0.  When we make a database, or use a password, we generate a pop-up window and use it for input and user notifications.  I always run in SCREEN _NEWIMAGE(1280,720, 32), and never caught this issue until I got an e-mail where someone was having problems with it.

Set a graphics mode before using any of the commands.  I'll look into trying to fix this issue in a few days (if I have time, Halloween is a busy time around here), but for now don't forget to run in a graphic mode (or else don't generate pop-ups!  LOL!!).   I'll just have to do a little research and figure out how to heck to make a SCREEN 0 pop-up.  I honestly don't think I've ran in text-only mode in YEARS!   

Looks like I've got to go back and refresh on the basics of BASIC....
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: QBDbase v1.1
« Reply #29 on: October 14, 2012, 03:35:48 PM »
Library Crashing Bug Found (Fixed in newest update):

As sometimes happens, when you add one thing to a set of code, you break another.  I've got to admit, I did that here.   :-[  :-[

When I added the functions to allow a user to change the max length of a database even after creation, I killed the database open routine.   The bug is a simple fix, and I'll illustrate here what happened so that others can be careful to watch for such an error in their own code in the future:

In the OpenData subroutine (in the DataLibraryF.BM footer file), we have this:

Code: [Select]
IF H.maxnumberofrecords = 0 THEN
    DataMem(fileon) = _MEMNEW(100000 * el + 1 + H.startofdata) '                             This allows for a default of 100,000 records in memory
ELSE
    DataMem(fileon) = _MEMNEW(d.maxnumberofrecords * el + 1 + H.startofdata) '               We use the users set number of maximum records and store them all in memory
END IF
DIM b AS STRING * 512 '                                                                      We get our data 1000 bytes at a time from the disk to reduce the times we need to access the disk

Can anyone see what our problem is??

H.maxnumberofrecords is our header which tells us what the max number of records should be for our database.
If it's 0, we use the program default and allow for a whopping 100,000 records.  (I wanted to make it big enough most users would never even need to bother with it.)
If it's anything but zero, we reserve a memory block for d.maxnumberofrecords....

???

Who is D?  What is D?  I have no clue!!   There is NO d.maxnumberofrecords.    H is our header.   H.maxnumberofrecords is the number of records we want.  d.maxnumberofrecords is simply ZERO.  Nada!  We don't use it.  It holds no value...

So what this is doing is it's saying:
How many records does the user want?
0?   -- > Then lets save space for 100,000 of them in memory.
Anything besides 0?  -->  Then lets let them have space for NONE!!   Muw Ha Ha Ha Ha!!

The manual fix?   Simply go in and change that devilish D to a happy H, and save it.   That's it...

Such a simple thing, but it's amazing how 1 letter can completely demolish so much code.  (and the QB64 error messages does almost nothing to help find the issue.  This is one of those, "I'm working as I should.  What's wrong with YOU?" type errors...)

If you use anything different than the default record size, go in and fix this first.  It WILL crash and burn and blibber madly at you if you don't.  I'll update the code myself to fix this, and it'll be included in the next update when I get a chance to work on it as well.  :)


Note:  Lastest release has this fix and a few others.
« Last Edit: October 15, 2012, 10:19:37 AM by SMcNeill »
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

  • Print