IF Computer > MINERVA > Example Programs > MINERVA Features > JDBC

JDBC

MINERVA
ifcomputer logo
f
Expert Services on the Web

Using JDBC/ODBC to pass SQL statements to MS-Access.

The program connects to an existing data base, reads everthing it can find from a table 'TABLE1', then adds a record with INSERT and reads the updated database.

The example uses create_interface/2 to make the JDBC driver available to the MINERVA programmer.

The program is configured as standalone application.

Example output:

'SELECT * FROM table1'
statement_execute('SELECT * FROM table1')
statement_getResultSet
        '1'     '1'     hello
        '2'     '2'     'おはよう'
        '3'     '3'     hey
        '4'     '4'     moin
        '5'     '5'     working
'INSERT INTO TABLE1 VALUES (6, 6,\'more data\')'
statement_execute_failed
'SELECT * FROM TABLE1'
statement_execute('SELECT * FROM TABLE1')
statement_getResultSet
        '1'     '1'     hello
        '2'     '2'     'おはよう'
        '3'     '3'     hey
        '4'     '4'     moin
        '5'     '5'     working
        '6'     '6'     'more data'
'example done'

document: http://www.ifcomputer.co.jp/MINERVA/ExamplePrograms/MinervaFeatures/JDBC/print_en.html
published 2012/5/21 update 2001/3/22 (c) 1996-2009 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS