JDBC Plugin

From NSB App Studio
Revision as of 15:16, 9 June 2016 by James (talk | contribs) (ODBC != JDBC)
Jump to navigation Jump to search

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" />
  ...