Eye On SQL

new BookmarkLockedFalling
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Sept 12, 2017 10:04:14 GMT -5

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
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Sept 15, 2017 7:31:29 GMT -5

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
metro
Full Member
***

metro Avatar

Posts: 207

Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Sept 20, 2017 19:46:30 GMT -5

metro Avatar
I'll check it out when your server is up


Hmmmm! I didn't even know it was down. I think my computer is getting old - like me. Probably time for a new one.

I put it in the same place as the liberty basic program
ionSQL
Go to the runBasic directory for the runBasic program.

I'm making changes to both the ionSQL and SQLite programs.
The SQLite program is located at : kneware.com/rbp
It at least has documentation..

Stay tuned.

metro
Full Member
***

metro Avatar

Posts: 207

Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Sept 21, 2017 4:55:46 GMT -5

Thanks for the help..
Syntax error at line 3403: FUNCTION fldData$(field$)

How do you get the error? I don't get any errors!!

EDIT..

Ok! I think I know the problem.
The fldData$(field$) is in the liberty basic version of ionSQL.bas

The run basic version is the the libertyBasic/RunBasic/ directory..

Last Edit: Sept 21, 2017 5:00:34 GMT -5 by meerkat
metro
Full Member
***

metro Avatar

Posts: 207

Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Sept 21, 2017 8:14:25 GMT -5

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.

meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Oct 14, 2017 6:45:14 GMT -5

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
metro
Full Member
***

metro Avatar

Posts: 207

Last Edit: Nov 14, 2017 4:40:08 GMT -5 by metro
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Apr 7, 2018 5:21:19 GMT -5

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
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Apr 9, 2018 18:29:12 GMT -5

G'Day Dan

quote:
File is located at www.kneware.com/runBasic

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


Attachments:



Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
meerkat
Senior Member
****

meerkat Avatar

Posts: 250

Post by meerkat on Apr 10, 2018 6:10:31 GMT -5

Hello Down Under 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??

Thanks for the help
Dan


EDIT: Or maybe because you use Linux. I need to get a Linux machine running. I was kinda waiting for Fuchsia.
9to5google.com/2018/01/23/what-is-google-fuchsia-os/
Last Edit: Apr 10, 2018 6:56:15 GMT -5 by meerkat
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Apr 10, 2018 7:33:08 GMT -5

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 don't get that far with the new DB Dan,
this error is thrown as soon as I open the project
Runtime Error in program 'helpDesk': #sql execute(sql$)
file is encrypted or is not a database


I just tried the project on my Win10 machine and get the same problem....
old DB works on both systems


I did notice when I used "I'm a guest" it wouldn't let me in.. ??


I used DB Browser for Sqlite to manually add guest to the user table
so thats not an issue.

so for some reason the latest DB is not seen as a DB ...strange because i can open it with DB Browser
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate
metro
Full Member
***

metro Avatar

Posts: 207

Post by metro on Apr 10, 2018 7:37:33 GMT -5




EDIT: Or maybe because you use Linux. I need to get a Linux machine running. I was kinda waiting for Fuchsia.
9to5google.com/2018/01/23/what-is-google-fuchsia-os/


Interesting I'll spend some time reading that

Ive gone the other way... Linux as main OS and VirtualBox
running WinXP for my QuickBooks

The win10 laptop hardly gets used nowdays.
Intel Core2 QUAD CPU @2.54 x 4 Mint Linux 19.3 Mate