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
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
> 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!
> 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 ;-).
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-)
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/
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