I have a B4J app I've been using for years, that connects to a MS SQL server using jtds.
This new problem (for me), is when I package it and install it, using the internal Build Standalone Package
and then run the app, the db connection fails with "java.sql.SQLException: invalid database address".
It works fine when run from the IDE in Debug or Release.
I also have an older version that works when installed using the older packaging method (same code).
The only other difference between the older version and this new one is I converted it to B4XPages (which shouldn't matter).
I have another app that uses a Webview to connect to 'services' that required user/pw auth that is packaged and installed and I have no problem there.
I was hoping to 'upgrade' to the internal packager to make updates more convenient, which worked nicely with the 'webview' based app.
There isn't anything special about it, it is similar to examples in the forum.
I'll include below what I'm using.
I've read many forum threads/posts but perhaps just not hit on the right combination?
This new problem (for me), is when I package it and install it, using the internal Build Standalone Package
and then run the app, the db connection fails with "java.sql.SQLException: invalid database address".
It works fine when run from the IDE in Debug or Release.
I also have an older version that works when installed using the older packaging method (same code).
The only other difference between the older version and this new one is I converted it to B4XPages (which shouldn't matter).
I have another app that uses a Webview to connect to 'services' that required user/pw auth that is packaged and installed and I have no problem there.
I was hoping to 'upgrade' to the internal packager to make updates more convenient, which worked nicely with the 'webview' based app.
There isn't anything special about it, it is similar to examples in the forum.
I'll include below what I'm using.
B4X:
Private sqlX As SQL
#PackagerProperty: IncludedModules = javafx.web
#MergeLibraries: True ' didn't used to have this, didn't help
#AdditionalJar: sqlite-jdbc-3.7.2
#AdditionalJar: bcprov-jdk15on-154
#AdditionalJar: jtds-1.3.1.jar
sqlX.Initialize2("net.sourceforge.jtds.jdbc.Driver", _ ' tried Initialize too along with adding a specific /databasename (I'm just grabbing the list of databases with this App)
"jdbc:jtds:sqlserver://"&sServer, "user", "pw")
I've read many forum threads/posts but perhaps just not hit on the right combination?