REPOST: 9iLite with Java app on Palm - Help!

From: Shawn Jensen <shawn.jensen_at_pclsa.co.za>
Date: Fri, 25 Jan 2002 10:34:57 +0200
Message-ID: <2$--$%%%%---___$%$_at_news.noc.cabal.int>



Hello all
Perhaps you may be able to help me with this if you've worked with Oracle

lite before.

I've installed Oracle 9i lite and am developing a palm application which

talks to the oracle lite database on the palm using JDBC and SQL. I need to

clear up some issues on connecting to the lite database:

Here's some Oracle lite JDBC/SQL example code. This is a standard JDBC/SQL

operation.



import java.sql.*;

public class jdbcexample {

public static void main(String args[]) {

// to load the driver

try {

Class.forName("oracle.lite.poljdbc.POLJDBCDriver");

// connect to the database

Connection conn = DriverManager.getConnection("jdbc:polite:polite",

"system", "");

// create a table

Statement stmt = conn.createStatement();

stmt.executeUpdate("create table person (name char(20), age

integer, "+

" address char(100))");

// insert new rows into the table

PreparedStatement pstmt = conn.prepareStatement(

"insert into person values(?,?,?)");

pstmt.setString(1, "Kevin Smith");

pstmt.setInt(2, 30);

pstmt.setString(3, "123 Never Land Dr, SF, CA 11111");

pstmt.executeUpdate();

// query the table

ResultSet rset = stmt.executeQuery("select * from person");

// browse the result

while (rset.next())

{

System.out.println("Name : " + rset.getString(1)+"\n");

System.out.println("Age: " +rset.getInt(2)+"\n");

System.out.println("Address: "+rset.getString(3)+"\n\n");

}

rset.close();

stmt.close();

// commit the transaction

conn.commit();

// disconnect from database

conn.close();

}

catch (SQLException e)

// exception handling

{

System.out.println(e);

}

catch (ClassNotFoundException ee)

{

System.out.println(ee);

}

}

}



The first line of code says:

import java.sql.*;

I cannot find any of the java.sql packages in the oracle installation.

The following line loads the jdbc driver - no problem with that:

Class.forName("oracle.lite.poljdbc.POLJDBCDriver");

The next line connects to the database:

// connect to the database

Connection conn = DriverManager.getConnection("jdbc:polite:polite",

"system", "");

I cannot find the Connection and DriverManager classes which are contained

in the java.sql package, which i also cannot find.

Also, this is the database link - "jdbc:polite:polite", "system", "" - On

the Palm, I dont know whether this link would look different or not?

So this is what i'm trying to figure out. I dont know if there's some other

way of connecting to the lite database on the Palm and then carrying out the

usual SQL queries. I cannot find any documentation regarding this. Can you

help me with this?

Best Regards,

shawn

  • WAS CANCELLED BY =======: From: "Shawn Jensen" <shawn.jensen_at_pclsa.co.za> Control: cancel <3c51182f$0$239_at_hades.is.co.za> Subject: cmsg cancel <3c51182f$0$239_at_hades.is.co.za> Date: Mon, 28 Jan 2002 00:31:02 GMT Message-ID: <cancel.3c51182f$0$239_at_hades.is.co.za> X-No-Archive: yes Newsgroups: microsoft.test,alt.flame.niggers,comp.databases.oracle.tools NNTP-Posting-Host: w088.z064003087.lax-ca.dsl.cnc.net 64.3.87.88 Lines: 1 Path: news.uni-stuttgart.de!nntp.cs.uni-magdeburg.de!fu-berlin.de!news.stealth.net!msrtrans1!msrnewsc1!cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04!u&n&a&c&anceller Xref: news.uni-stuttgart.de control:40718441

This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers. Received on Fri Jan 25 2002 - 09:34:57 CET

Original text of this message