Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC connect to dabase fails, OK using ODBC

2 views
Skip to first unread message

kma...@maulesystems.ie

unread,
Jul 31, 2007, 5:02:50 AM7/31/07
to
Hi there,

Newbe here. I'm unable to connect via JDBC using OpenOffice 2.2.1
Base to an Informix 7.01 UC1 std edition database. My Classpath is
correct and passes the connection test. Using a known good user name/
password to a known good database fails with "Database not found or no
system permission" -329 error. I can connect OK via ODBC to this same
database with same credentials. Is there anything on the DB server
that may need to be done to enable JDBC connectivity?
Cheers,
Kirk

kma...@maulesystems.ie

unread,
Jul 31, 2007, 9:34:28 AM7/31/07
to
Further info: The error we are getting is a -329 "Database not found
or no system permission". Also saw a 956 error "Client host or user
com.informix.asf.IfxASFRemoteException: (root@81436fdf) is not trusted
by the server"

Roedy Green

unread,
Jul 31, 2007, 10:51:54 AM7/31/07
to
On Tue, 31 Jul 2007 02:02:50 -0700, kma...@maulesystems.ie wrote,
quoted or indirectly quoted someone who said :

In ancient China it was considered improper for a doctor to examine a
female patient. This must have made for some strange diagnoses. You
are doing the analogous thing. Post your code. see
http://mindprod.com/jgloss/sscce.html

--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lothar Kimmeringer

unread,
Jul 31, 2007, 1:56:40 PM7/31/07
to
Roedy Green wrote:

> Post your code.

As far as I understand the OP he has the problem while working
with OpenOffice. So I rather doubt that there is any.


Regards, Lothar
--
Lothar Kimmeringer E-Mail: spam...@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!

Lothar Kimmeringer

unread,
Jul 31, 2007, 1:58:48 PM7/31/07
to
kma...@maulesystems.ie wrote:

> I'm unable to connect via JDBC using OpenOffice 2.2.1
> Base to an Informix 7.01 UC1 std edition database.

You better should ask in a Newsgroup covering OpenOffice.
The code OO is using might be Java, but the exact way
what can fail and where to look at to find out can only
be told by people knowing OpenOffice (and Java ;-).

IchBin

unread,
Aug 1, 2007, 11:18:45 AM8/1/07
to
Lothar Kimmeringer wrote:
> kma...@maulesystems.ie wrote:
>
>> I'm unable to connect via JDBC using OpenOffice 2.2.1
>> Base to an Informix 7.01 UC1 std edition database.
>
> You better should ask in a Newsgroup covering OpenOffice.
> The code OO is using might be Java, but the exact way
> what can fail and where to look at to find out can only
> be told by people knowing OpenOffice (and Java ;-).
>
>
> Regards, Lothar

Some time last year OpenOffice changed its DBMS Base component to use
HSQLDB which is written in Java and an open source product. As mentioned
in other threads you need to provide the JDBC code you have written to
determine the problem. Also, as stated before in this thread, this is an
OpenOffice issue.

--
Thanks in Advance... http://weconsulting.org
IchBin, Philadelphia, Pa, USA http://ichbinquotations.weconsulting.org
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

kma...@maulesystems.ie

unread,
Aug 2, 2007, 4:41:31 AM8/2/07
to
It turns out the issue was much simpler. The JDBC connection URL was
incorrect as the value for informixserver= was set to the server's
host name and not the logical server name.
Thanks for the replies!
Kirk

dilip

unread,
Aug 31, 2007, 7:22:31 AM8/31/07
to
On Jul 31, 2:02 pm, kma...@maulesystems.ie wrote:
> Hi friends,
myself dilip here are the following code for JDBC Connectivity.
Use that sample code according to your database name.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con=DriverManager.getConnection("jdbc:odbc:<DSN_NAME>","User_Name","Password");
Statement st=con.createStatement();

above code may solve your difficulty hopefully.
Thanks,
Dilip Kuamr
http://www.intelcs.com/IT-Companies/

Lew

unread,
Aug 31, 2007, 10:03:09 AM8/31/07
to
dilip wrote:
> On Jul 31, 2:02 pm, kma...@maulesystems.ie wrote:
>> Hi friends,
> myself dilip here are the following code for JDBC Connectivity.
> Use that sample code according to your database name.
>
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> Connection
> con=DriverManager.getConnection("jdbc:odbc:<DSN_NAME>","User_Name","Password");
> Statement st=con.createStatement();
>
> above code may solve your difficulty hopefully.

Just to add to dilip's good advice, notice that he's given you just the basic
method calls. You have to add exception handling (forName() can throw various
exceptions such as ClassNotFoundException, createStatement() can throw
SQLException, ...). You need a finally{} block after your access code to
close the connection. In other words, dilip gave you a signpost, not a road.

Oh, and prefer prepareStatement() to createStatement(). The latter has
security vulnerabilities (google for "SQL injection attack"), and most
database engines (I'm not sure about MySQL) can optimize the former.

--
Lew

0 new messages