SQLImport with result 'undefined'

Thank you!

This isn’t a minimal project. There are 3 projects in this folder.

What do I need to do to reproduce the problem?

Load
SQLExport2.project
and start it in Desktop Browser (F5 or F6)
Then click Button Create and then Button Export
in my environment the message is: “no DBString in DBJson! Try again” which means there is nothing exported!
Clicking the Export Button again brings the message: “Export completed”
You can test it in the debugger to see, that in the first run DBJson is undefined and in the second run it is “DBBil.db”, means successfull.

Thank you - just what I needed. It looks with there is a timing problem - exportComplete is being called before the export is complete.

We’ll fix that.

Glad you were able to reproduce it.

Dug deep into this - I’ll need to get one of the other guys involved as well.

In the meantime, can you tell me a bit more about what you’re trying to do, so we can help figure out a workaround?

I want to Export the whole database as text into my app, write it with Cordova to Android/data/com.nsbasic.Bilanz9 and let it synchronize (with the app FolderSync) to a Dropox folder. From there a second device will be able to sync it downwards and Import it into its database. So 2 devices can communicate via shared data.

Will the app will be running as a native app, not a web app?

Yes, as a native app

In that case, you should use the Cordova plugin. It’s faster and can handle much bigger databases.

You’ll need to add this line to your config.xml property in Project Properties, in the VoltBuilder tab:

<plugin name="cordova-sqlite-evcore-extbuild-free" source="npm" />

The actual code in your app is the same either way. It’s actually possible for your app to use SQLite WASM when running as a web app. and the plugin when running native.

The build of a native app after including the above ststement in config.sys results in the following error:
UserError: FAILURE: Build failed with an exception. * Where : Script '/agent/upload/7e5c7426-a3ef-4d33-ad54-f05b6a6c94eb /platforms/android/CordovaLib/cordova.gradle' line: 79 * Wh at went wrong: A problem occurred evaluating script. > No us able Android build tools found. Highest 35.x installed versi
Correction: this error also occurs with my app of yesterday !??

Between yesterday and today, Cordova updated a plugin, which is what is causing this.

The workaround is to add this to the config.xml property:

<engine name="android" spec="13.0.0" />
<preference name="android-targetSdkVersion" value="34" />```

It works very well! The Export problem no longer exists! Can I rely on the Cordova plugin ‘…sqlite’ continuing to work in the future?

Yes - it’s widely used, open source, and well supported.