This shows you the differences between two versions of the page.

Link to this comparison view

72:custom_reports_accessing_data_collecting_data [2019/02/07 14:06]
ext-bkkr created
72:custom_reports_accessing_data_collecting_data [2019/03/06 19:21] (current)
Line 1: Line 1:
 ====== Collecting External Data ====== ====== Collecting External Data ======
 +==== Connecting a JDBC Database via Stages Data Source ====
 +The Java Database Connectivity (JDBC) API provides universal data access from the Java programming language. Using the JDBC 3.0 API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built.
 +With the following script in a Stages dataset you can access the Stages mysql database on your local PC running Stages.
 +var url = "​jdbc:​mysql://​localhost/​pkit"​
 +con = DriverManager.getConnection( url, "​root",​ "​pass"​ );
 +stmt = con.createStatement(
 +srs = stmt.executeQuery("​SELECT artifact_id FROM artifact"​);​
 +while (srs.next()) {
 +The JDBC driver must be in the Stages classpath in
 +[install directory]\projectkit\tomcat\webapps\pkit\WEBINF\ platform\plugins \org.eclipse.birt.report.data.oda.jdbc_x.y.z\drivers