Hi,
have explored. Pls find below and attached a sample project. Copy the cards.mdb to the files folder after compile.
To connect to databases via JDBC, you need the JDBC Driver and JDBC URL Format.
-General Information
Download the driver from the reference site.
Copied the driver to the additional libraries folder: Menu Tools > Configure Path > Additional Libraries
Add the driver(s) to the Project Attributes as #AdditionalJar.
Reference the jSQL Library in the B4J IDE Libs Tab.
Look here:
http://docs.oracle.com/javase/tutorial/jdbc/ to learn more about JDBC.
-MS Access Database
Information & Download:
http://ucanaccess.sourceforge.net/site.html
ADDITIONAL JAR:
#AdditionalJar: ucanaccess-2.0.2.jar
#AdditionalJar: hsqldb.jar
#AdditionalJar: jackcess-2.0.3.jar
#AdditionalJar: commons-logging-1.0.4.jar
#AdditionalJar: commons-lang-2.6.jar
JDBC DRIVER CLASS:
net.ucanaccess.jdbc.UcanaccessDriver
JDBC URL FORMAT:
jdbc:ucanaccess://<Path to Databasemdb>;memory=true
Example:
Private gSQL As SQL
gstrDBFile = File.DirApp & "\cars.mdb"
gSQL.Initialize("net.ucanaccess.jdbc.UcanaccessDriver", "jdbc:ucanaccess://" & gstrDBFile & ";memory=true")
DBUtils.ExecuteTableView(gSQL, "SELECT * FROM cars", Null, 0, tvwMain)