JDBC Plugin: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Created page with "This plugin allows you to execute simple queries against any database with a JDBC driver using Android. Due to the requirement of adding a driver JAR, it's not compatible with..."
 
m ODBC != JDBC
Line 1: Line 1:
This plugin allows you to execute simple queries against any database with a JDBC driver using Android. Due to the requirement of adding a driver JAR, it's not compatible with automated build services (like PhoneGap Build). You'll need to use [[PhoneGap CLI|PhoneGap CLI]]  
This plugin allows you to execute simple queries against any database with a JDBC driver using Android. Due to the requirement of adding a driver JAR, it's not compatible with automated build services (like PhoneGap Build). You'll need to use [[PhoneGap CLI|PhoneGap CLI]]  


The plugin provides a generic interface for using ODBC libraries with a PhoneGap plugin. The interface has a hook to a Java driver which does the actual work. [https://en.wikipedia.org/wiki/JDBC_driver JDBC drivers] are available for many databases.
The plugin provides a generic interface for using JDBC libraries with a PhoneGap plugin. The interface has a hook to a Java driver which does the actual work. [https://en.wikipedia.org/wiki/JDBC_driver JDBC drivers] are available for many databases.


The main documentation and files for the plugin are here: https://github.com/arsmentis/cordova-plugin-jdbc. In this document, we will discuss how to use the plugin from AppStudio.
The main documentation and files for the plugin are here: https://github.com/arsmentis/cordova-plugin-jdbc. In this document, we will discuss how to use the plugin from AppStudio.

Revision as of 15:16, 9 June 2016

This plugin allows you to execute simple queries against any database with a JDBC driver using Android. Due to the requirement of adding a driver JAR, it's not compatible with automated build services (like PhoneGap Build). You'll need to use PhoneGap CLI

The plugin provides a generic interface for using JDBC libraries with a PhoneGap plugin. The interface has a hook to a Java driver which does the actual work. JDBC drivers are available for many databases.

The main documentation and files for the plugin are here: https://github.com/arsmentis/cordova-plugin-jdbc. In this document, we will discuss how to use the plugin from AppStudio.

Begin by making sure the PhoneGap CLI toolchain is installed properly. Documentation for installing it is in the Install Tools section of this page: here.

Next, create a new project in AppStudio. You'll need to do a couple of extra steps:

  1. Add the hook to configxml: Open configxml in Project Properties. Add the hook declaration just after <platform name="android">
<platform name="android">
  <hook type="after_prepare" src="scripts/copyDriver.js" />
  ...