LWGShane Well-Known Member Licensed User Longtime User Jan 27, 2017 #1 With the existence of RDC, I'm suggesting the following for the SQL library: - Replace "InitializeSQLite" with "Initialize" and remove the MySQL functions. (So the libraries do the same thing across B4A, B4i, and B4J.) - Rename all SQL libraries to B4XSQLite
With the existence of RDC, I'm suggesting the following for the SQL library: - Replace "InitializeSQLite" with "Initialize" and remove the MySQL functions. (So the libraries do the same thing across B4A, B4i, and B4J.) - Rename all SQL libraries to B4XSQLite
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2017 #2 B4J jSQL library can work with any database that provides a JDBC driver (all popular databases). There isn't any method specific to MySQL. The only method specific to a single db engine is InitializeSQLite. It has two purposes: 1. To make it easier to work with SQLite database which is a common database. 2. It allows SQLite databases to be accessed concurrently: https://www.b4x.com/android/forum/t...ent-access-to-sqlite-databases.39904/#content Other than that the library is cross platform compatible.
B4J jSQL library can work with any database that provides a JDBC driver (all popular databases). There isn't any method specific to MySQL. The only method specific to a single db engine is InitializeSQLite. It has two purposes: 1. To make it easier to work with SQLite database which is a common database. 2. It allows SQLite databases to be accessed concurrently: https://www.b4x.com/android/forum/t...ent-access-to-sqlite-databases.39904/#content Other than that the library is cross platform compatible.
LWGShane Well-Known Member Licensed User Longtime User Jan 29, 2017 #3 I have a solution that would satisfy both of us. (These wouldn't require any code-base changes or removal of features.) - Rename "Initialize" and "Initialize2" to "InitializeWithDriver" and "InitializeWithDriver2", respectively. - Rename "InitializeSQLite" to "Initialize". (Would allow for easier code portability.) I do understand that the library is cross-platform compatible, I was talking about code portability. Ex: Instead of this: Code: Copy Dim SQL As SQL #If B4J SQL.InitializeSQLite("","") #Else SQL.Initialize("","") #End If You could have this: Code: Copy Dim SQL As SQL SQL.Initialize("","") If you need to use another database: Code: Copy Dim SQL As SQL SQL.InitializeWithDriver("", "") 'No Auth Required SQL.InitializeWithDriver2("","","","") 'Auth Required Thus you wouldn't need to use the conditional statements to determine the IDE.
I have a solution that would satisfy both of us. (These wouldn't require any code-base changes or removal of features.) - Rename "Initialize" and "Initialize2" to "InitializeWithDriver" and "InitializeWithDriver2", respectively. - Rename "InitializeSQLite" to "Initialize". (Would allow for easier code portability.) I do understand that the library is cross-platform compatible, I was talking about code portability. Ex: Instead of this: Code: Copy Dim SQL As SQL #If B4J SQL.InitializeSQLite("","") #Else SQL.Initialize("","") #End If You could have this: Code: Copy Dim SQL As SQL SQL.Initialize("","") If you need to use another database: Code: Copy Dim SQL As SQL SQL.InitializeWithDriver("", "") 'No Auth Required SQL.InitializeWithDriver2("","","","") 'Auth Required Thus you wouldn't need to use the conditional statements to determine the IDE.
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2017 #4 This is a reasonable solution however it is not backwards compatible and as I see it, the advantages are not worth creating a new jSQL library with a different name (which will add confusion).
This is a reasonable solution however it is not backwards compatible and as I see it, the advantages are not worth creating a new jSQL library with a different name (which will add confusion).
jmon Well-Known Member Licensed User Longtime User Jan 30, 2017 #5 GreenUFO13 said: Replace "InitializeSQLite" with "Initialize" Click to expand... for your info, you can initialize Sqlite this way: Code: Copy Dim SQL As SQL Dim dbPath As String = File.Combine(File.DirApp, "temp3.db") SQL.Initialize("org.sqlite.JDBC", "jdbc:sqlite:" & dbPath)
GreenUFO13 said: Replace "InitializeSQLite" with "Initialize" Click to expand... for your info, you can initialize Sqlite this way: Code: Copy Dim SQL As SQL Dim dbPath As String = File.Combine(File.DirApp, "temp3.db") SQL.Initialize("org.sqlite.JDBC", "jdbc:sqlite:" & dbPath)