My DATABASE for SB. RRS feed

  • General discussion

  • You can test my DATABASE sample and use the routines for own projects. Please show KMM839-0. It is a sample to create a Database, put Data into it, delete data, Search data, sort data and so on.

    I hope you can use it.

    Here is a sample for binairy search for sort Array and KDN526

    Best Regards Martin

    • Edited by martmen Sunday, July 7, 2013 7:45 PM
    Wednesday, July 3, 2013 2:52 PM

All replies

  • The database looks impressive.

    Skimming through your code I detected that there are some lines commented, like some of the DBSave() routine. Maybe you could upload somewhere the untouched source like to the gallery?

    'Save the DATABASE to a file
    'Input - DBFile, DATABASE[DBID]
    'Output - saved File
    Sub DBSave
      For i = 1 To LastDBID 
        D = DATABASE[i]
    ' The following line could be harmful and has been automatically commented.
    ' The following line could be harmful and has been automatically commented.
    ' '     File.WriteContents(DBFile[i], D)
        D = ""
    EndSub 'DBSave

    • Edited by Florian Auer Wednesday, July 3, 2013 8:55 PM found
    Wednesday, July 3, 2013 8:36 PM
  • The LitDev extentions are on

    Download the Zip-File

    Close Small Basic.

    Extract the Zip-File and copy 2 files (LitDev.dll and LitDev.xml) in the Small Basic Folder with name lib. Is there no lib folder create it.

    On my Computer it show like this:


    Start Small Basic. Put in LDArray. If it ok then you see the comment.

    My Database don't save anny Fieles because the comment FILE and so on are mark as remark. The lines with "The following line could be harmful and has been automatically commented." delete please and the '' in the next line also. The same is by DBLoad.

    The LD-Extention used in the DATABASE for sort the Data. I know no other possibility to sort an Array.

    I writing in the moment a adress program with this Database. If i finish it then puplicate it it here. 

    Best Regards Martin

    • Edited by martmen Wednesday, July 3, 2013 9:15 PM 12457
    Wednesday, July 3, 2013 9:08 PM
  • Thank you Martin! Now it works.

    If you only use the extension for sorting, maybe a simple sorting algorithm like bubble sort could be implemented. This would allow us to use the DATABASE also on the web.

    Wednesday, July 3, 2013 9:26 PM
  • It is not possible to sort a text in Small Basic because "<" (lower) and ">" (greater) dosn't funktion. By a trick it is possible but then it is too slow. Evry Text to sort you convert to the ASCII numbers and then you can use "<" and ">". You can try it.

    Best Regards Martin

    Wednesday, July 3, 2013 10:46 PM
  • I wrote a subroutine that can compare 1000 words in ~20ms which I think is fast enough to be an alternative. It is called TextCompare and its code is VTQ957. Sadly it needs a file that stores a list of words for testing, so you can't run it on the web. But this restriction is only for the test not for the subroutine.

    The output (with logging enabled):

    The time is only so bad because of the additional logging (TextWindow.WriteLine is slow)

    For the word list I used the one that comes with the language creator from ardiezc_quazhulu(i hope that's okay)

    • Edited by Florian Auer Thursday, July 4, 2013 11:19 AM add link
    Thursday, July 4, 2013 11:14 AM
  • Fine routine Florian,

    but by 10000 entries with longh words in a data base it is to slow. Then it is a delivery time not a Response time :-).

    Best Regards Martin

    • Edited by martmen Sunday, July 7, 2013 9:38 PM jhgf
    Sunday, July 7, 2013 9:37 PM