viewpoint-particle

Author Topic: **************** SQLite Extender Version 44001 (beta) Released ***********  (Read 973 times)

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
The SQLite WIL Extender allows WinBatch scripts to create, modify, and query SQLite databases.

Version 44001  Nov 22, 2023 (Beta release.)

YASAM (Yet Another SQLite Access Method) for WinBatch. This extender's design goals are to implement WIL extender functions that follow the underlying SQLite library's exposed interfaces without excessive abstractions and to present SQLite database data values directly as WIL variable types. The benefits of this approach are a simpler extender interface and better performance.

The extender does require some knowledge of the SQL programming language as the extender documentation does not offer an SQL tutorial. It does, however, contain several WinBatch script sample files and an SQL script for building Microsoft Access' NorthWind database.

The goal is to maintain the current design strategy. This means that any feature request will be considered only in the context of that strategy.

The extender can be downloaded here:

https://files.winbatch.com/downloads/wb/ilcsl44i.zip

Or you can use the vcheck script.

This is beta software so you may find a few bugs. Reporting them is appreciated.

*The extender's help file is not yet integrated into Consolidated WIL Help, so you must locate the file in the WinBatch folder and click on the file to view it.

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

  • Pundit
  • *****
  • Posts: 513
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #1 on: November 24, 2023, 06:59:20 am »
So good!!! Thanks Tony!!!
-Kirby
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1948
    • Data & Stuff Inc.
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #2 on: November 24, 2023, 02:14:45 pm »
Excellent.  Another section of my Extender I can look at deprecating.

One question, your CSV import example, should the data be readable once the import is complete?   Looks like it is not handling the Unicode for the foreign languages or I am doing something wrong.  It looks fine in the file but scrambled in the grid display unless the field is all plain text.


Jim

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #3 on: November 25, 2023, 06:08:03 am »
The answer depends on what you mean by  "Unicode for the foreign languages". Assuming you are referring to the country code CSV files on the GitHub site, they are all UTF-8 and will work as long as the UTF-8 only contains characters that overlap bitwise with ANSI characters. Otherwise, you would need to convert the UTF-8 to UTF-16 LE before loading the file into the dialog control. This is the case because WIL dialogs are like the Windows OS and only directly support ANSI and UTF-16 LE. This is not a new topic and file conversions have been discussed several times before.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1948
    • Data & Stuff Inc.
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #4 on: November 25, 2023, 06:47:05 am »
I am well aware of the joys of making Unicode stuff work and have been a part of those discussions.   I simply downloaded the file you referenced and ran your sample code, as is.   Didn't know if it should display properly or not.   Seemed odd you would offer sample code that wouldn't work as expected so thought maybe there was a problem.  You asked that we report bugs.  Didn't know if this was one or not so thought I would ask.


Jim

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #5 on: November 25, 2023, 07:42:46 am »
Nothing odd about it. The US-English version of the county code file used by the examples works fine without any conversion for the WIL dialog. You do not need to perform any conversion of the UTF-8 CSV files for the SQLite extender. This is because SQLite's native character encoding is UTF-8 and the extender handles returning SQLite database data as UTF-16 LE in WIL variables. In fact, you could use the extender to convert a UTF-8 CSV file to a UTF-16 LE array for displaying the file's contents in a dialog.

<edit>The URI to the GitHub country code CSV file in the sample script and the URI in the WIL help file will be changed to point directly to the English file.   
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1849
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #6 on: November 26, 2023, 04:22:59 am »
Have to stay on side lines as my version is still 2022C, but do have a question: Does the upgraded Extender no longer require SQLite binaries to be downloaded?

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #7 on: November 26, 2023, 06:21:37 am »
The new SQLite extender is self-contained so only WinBatch and the extender are required.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1849
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #8 on: November 26, 2023, 09:34:25 am »
Thanks

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #9 on: November 28, 2023, 02:57:35 pm »
Uploaded a new version of the extender zip file. No changes to the DLL but made a few tweaks to the documentation including updating the CSV example per the discussion above.

Thanks, Jim for pointing out the URI problem. It led to a modification to the example that makes it a better demonstration of the extender's usage.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

bottomleypotts

  • Jr. Member
  • **
  • Posts: 92
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #10 on: December 13, 2023, 09:01:10 am »
I'm keen to try this new extender, however I find that sqlite cannot match the one thing Microsoft Access can do for me, and that is generate SQL statements with such ease using the GUI. It's the one thing that keeps me in the Microsoft ecosystem.

Does anyone have any suggestion for this obstacle of mine?

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #11 on: December 14, 2023, 07:40:21 am »
SQL has an almost natural language syntax and isn't that difficult to master. Like most other skills, proficiency comes from doing. You could start with a tutorial like the one offered by W3 School https://www.w3schools.com/sql/. And then pick a problem you need to solve and solve it. There are endless examples of SQL statements online, so if you get stumped, you can probably find one that helps.

There are multiple online SQL generators that use  (what else?) AI to create SQL statements. They may be useful if you get completely stumped but using them may foster dependency rather than proficiency.

When I worked as a teaching assistant in the computer science department at the university I was attending, I found that the cheat sheets I prepared for my students were a great help to the students. As a bonus, preparing them helped me become more proficient at the same skill. You could create your own personalized cheat sheet for SQL.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

bottomleypotts

  • Jr. Member
  • **
  • Posts: 92
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #12 on: December 14, 2023, 12:15:05 pm »
Thanks Tony, I didn't say I didn't know SQL. Just that Microsoft Access can do it for me, which I don't believe you are arguing against. Just think, you've advocated using AI, where Access can generate them far more accurately and it's a stupid tool that's been around for nearly 35 years.

td

  • Tech Support
  • *****
  • Posts: 4444
    • WinBatch
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #13 on: December 14, 2023, 01:50:21 pm »
I was just offering a little sarcasm directed at the latest tech fad and was not advocating the use of AI. There are multiple generators out there both using and not using AI. I have never needed to use any of them (including MSFT's version which will likely soon be AI-based...) so I have no idea which is better.

If you think Access is the greatest tool out there then use it but it does bring into question the point of your post. Maybe just felt the need to troll? Or is it that you don't understand nor/or appreciate the reasons for SQLite's popularity?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1849
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #14 on: December 16, 2023, 05:38:37 am »
While not a thread to go off on MsAccess SQL... it would be an interesting topic for another thread. That said: to SQLite's credit
  • In-Memory databases
  • Attach to other db's [something you can do with Access linked files, but kinda clunky]