viewpoint-particle

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

td

  • Tech Support
  • *****
  • Posts: 4382
    • 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

  • Sr. Member
  • ****
  • Posts: 511
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: 1939
    • 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: 4382
    • 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: 1939
    • 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: 4382
    • 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: 1812
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: 4382
    • 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: 1812
Re: **************** SQLite Extender Version 44001 (beta) Released ***********
« Reply #8 on: November 26, 2023, 09:34:25 am »
Thanks

td

  • Tech Support
  • *****
  • Posts: 4382
    • 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