SQLite not working for me in Chrome with the latest NSB/AppStudio (9.0.7.1)

The Library “SQLite (WASM)” is checked for the project. But, I only get a “SQLite is NOT supported” when I run the following suggested test code as “Start in Desktop Browser” with Chrome Version 127.0.6533.101 (Official Build) (64-bit).

  If window.openDatabase Then
      MsgBox("SQLite is supported")
  Else
      MsgBox("SQLite is NOT supported")
  End If  

Am I missing something really obvious?

Somebody correct if I’m wrong but ‘window.opendatabase’ is a call of browsers’ depracated built-in SQLite function, not a function of the SQLite (WASM) library.

@lotsofcows - you’re correct.

@jimG - What are you trying to accomplish?

Thank you both for your responses. I was not getting SQLite to work in an application I am developing. So, I created a new project with the code sample in the NSB wiki… for “Using SQLite” (and modified it to reflect the “Support for SQLite” update). I could not get that to work either. I have now opened and successfully run the “SQLSample2” which contains a significantly modified version of code. I will subsequently be careful to search for samples when they are available.

1 Like

From our end, we will review the docs and make sure they are consistent with the sample.

Docs have been updated online. The offline docs are updated in the next build.

George, I’m not being abble to make this works, already tryed sample2, it works, but not my code, even with SQLite library checked:
image
image
I don’t know if this helps:
image
The reference error was solved, even thus, it doesn’t enters in IF NSB.SQLITE3 check as if it does not exists, already tryed complete uninstall too and beta version.

@ghenne Do you have any idea?

I can’t see your code - but I find it interesting that the error message (“tableExistCheck is not defined”) happens before the “Loaded SQLite3…” message. Are you perhaps trying to use SQLite before it is done being initialized?

The safest thing to do is don’t try to execute SQLite statements at startup - wait until Main() is called.