A while back I wrote a program in Liberty basic to manage SOLite databases. I wrote a similar system in Run Basic. I got busy on other projects and it's been sitting there for a while. I wanted a comparison of RB vs LB. For me personally, it's a lot easier with more power and functionality in RB than LB. Hopefully I can get back to it and finish it. Anyway I decided to share what I have. It's got a couple things missing, but most of it is there.
If you find bugs let me know, or share your fixes.
I put it in the same folder as the Liberty Basic program. kneware.com/libertybasic/ and go to the RunBasic folder. I put a couple databases there for test. One is a database I did for a major winery. Should be a good test.They weren't real large and had about 1000 tanks.
Good luck .. I'll get back to it as soon as I can.. Have fun... Dan
Got a little time to fix a couple of bugs. You can now load a database from a directory tree. Makes it a lot easier to find files. Still have a bug when you delete a database from your system but still have the file loaded in the ionSQL database. It says correctly that it does not exist - but I need to do something to get rid of it..
After taking another look at the SQLite program that was written a long time ago, I think it works a lot better with better functions. What that in mind, I'm abandoning ionSQL and will work with SQLite instead. I did what I wanted anyway. That was to compare a similar program in liberty basic to run basic. To me it proved the following: You can write similar programs. 2. Don't try to match LB and follow what works best in RB. LB has it's best practices and RB has it's. SO if anyone wants to pick up ionSQL and finish the development - go for it.
Good luck.. Dan
Last Edit: Sept 15, 2017 8:38:09 GMT -5 by meerkat
No problem... Where I put the stuff is kinda confusing.
The major problem I run into is "Database Locking". Maybe you've run into it. I haven't used RB in a while. In fact the reason I left RB is because of the "locking problem". I've tried everything to eliminate it, but no luck. One of the reasons I have the crazy [connectDb] routines was an attempt to get around the problem. It did help but still get the locks. If you try to do a SQL command with something like "UPDATE table SET field = 0 WHERE field = '0d' you may get it. Remember the '0d' problem in numeric fields. The only way to unlock the file is to kill the RunBasic backend and restart it. I'm convinced that RB itself somehow hangs on to the lock and does not release it - it's locked forever.. I don't get the problem with any other language - only RB. Liberty Basic works fine.
I guess I'm wondering if anyone has solved this problem?? If so - how do I fix it.
I made some bug fixes and changes. Added Speech - actually too much speaking. I need to trim it down
One change was file look up when Loading a database. It Shells out with "dir c:\*.*" for windows. I look at the data returned and display the directory with select options.
My question: Does anyone have an example of what the linux Shell looks like. I don't have a linux machine now to test. I know the Shell command is "ls/la" But I can't remember what the the linux stuff looks like.
Thanks for the help.. Dan
Last Edit: Oct 14, 2017 18:53:09 GMT -5 by meerkat
Cleaned up a few bugs and made some changes/additions to ionSQL. Added some docs on usefulSQLtipe.html and ionSQL.html. It will now allow addition of fields to a location in the table. It generates RB programs to maintain the tables. Let me know if you find bugs.. File is located at www.kneware.com/runBasic The ionSQL.zip should be the only file you need. Create a RB project called ionSQL and unZip it there. I included a helpDesk project that may help you test the system. I added some SPEECH. Doesn't add any functionality, but I was curious. I'll probably take speech out on next update. Good luck.. Dan
at the same location you have your Help desk system, the latest helpDesk.db throws an error when running helpDesk.bas.(see attached) the system works fine with the old db (Apr 22 2010), not sure whats changed!
also to make it friendly to my system I added...
if left$(Platform$,3) = "win" then incdir$ = DefaultDir$ + "\projects\helpDesk_project\" else incdir$ = DefaultDir$ + "/projects/helpDesk_project/" end if run incdir$;prog$,#include render #include
all the best metro
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
the latest helpDesk.db throws an error when running helpDesk.bas.
Hmmmm! Not sure what is going on. I just ran it and it works for me. Maybe it has something to do with the Sign In.. I signed in with user/pass = admin/admin. Or maybe the zip did something. I'll run some test
I did notice when I used "I'm a guest" it wouldn't let me in.. ??
Where did you put the test for linux Directory. In the helpDisk.bas??