Page 1 of 1

Jade, OBDC and Java

Posted: Fri Aug 07, 2009 12:38 pm
by ConvertFromOldNGs
by Michael Hill >> Mon, 30 Aug 2004 5:14:47 GMT

Afternoon,

Has anyone tried connecting to Greentree using ODBC and Java. I've tried connecting and I get this error:

Unable to add connection, cannot establish a connection to jdbc:odbc:Greentree using sun.jdbc.odbc.JdbcOdbcDriver ([Jade Software Corporation][JADE ODBC Driver] An unknown column attribute was requested)

The code I'm using is:

static ResultSet res;
static Connection conn;
static Statement stat;

/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:Greentree");
System.out.println("Conn" + conn);
stat = conn.createStatement();
res = stat.executeQuery("Select * from Customer");
res.next();
}
catch(ClassNotFoundException cnfe)
{
System.out.println("ClassNotFound: " + cnfe.toString());
}
catch(SQLException sqle)
{
System.out.println("SQLException: " + sqle.toString());
}

}

Does anyone have any suggestions?

Cheers

Michael Hill
Ashburton Computer Associates

Re: Jade, OBDC and Java

Posted: Fri Aug 07, 2009 12:38 pm
by ConvertFromOldNGs
by allistar >> Tue, 31 Aug 2004 8:36:02 GMT

Hi Micheal,
My first suggestion would be to see if the connection works using a simple tool like MSQuery (if you have it available). It is possible that the JAVA classes for this are expecting a higher ODBC compliancy level than the JADE ODBC provides.

Also turn on SQL tracing (in the ODBC control panel) for more detailed information about this error.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------