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

JDBC-ODBC Bridge

0 views
Skip to first unread message

gre...@my-deja.com

unread,
Aug 2, 1999, 3:00:00 AM8/2/99
to
I am trying to use the JDBC-ODBC bridge so that I can test my
application with MS Access. The final product will use Oracle and use
Oracle's thin JDBC driver. I have tested against Oracle and everything
seems to work, but when I use the JDBC-ODBC bridge, none of my
PreparedStatements work the second time that stmt.execute() is invoked.
I am not explicitly closing the Connection object nor the
PreparedStatement object as far as I can tell. I have noticed however
that if i set DriverManager.setLogStream() and look at the log
information, that after the first execute() on each prepared statement
SQLFreeStmt() is called. I think this is the reason why when I call
execute() the second time on the prepared statement, I get the following
exception:
java.sql.SQLException: Invalid state for getResultSet
at
sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:253)
at
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(JdbcOdbcPreparedSta
tement.java:106)

any ideas of what I may be doing incorrectly? as I said above,
everything works with the Oracle Type4 JDBC driver.

- Greg


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Bret Ewin

unread,
Aug 2, 1999, 3:00:00 AM8/2/99
to
I had this same problem. The bridge for 1.1 worked fine, then we switched to
1.2 and the error you describe started. Fortunately, we use a
PreparedStatement pool and were able to apply the changes in one place only.
Basically I just close the Statement and open a new one every time I need
one. It sucks but if you have to support the bridge it's what you have to
do.

Bret

Alex Vaysman

unread,
Aug 3, 1999, 3:00:00 AM8/3/99
to
Sometime ago I saw this kind of problem being answered here.
I believe the answer was to call clearParameters() method of
PreparedStatement and then set the parameters for
the subsequent statement. Hope this helps.

Alex.

In article <37A63603...@ewin.org>,

--
Alex Vaysman
alex_v...@email.com

AshogaKumar r

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to
----------------Anybody help!! lost in the technology zoo---------------
Pls clear this ??

The database is Oracle 8 and it resides in SUN solaris.I'm running jdk1.2 in
Windows NT.How can I connect to database.Should I download any driver.What
driver should I use.Is it a thin or oci.What jdbc protocol shoul I use in my
program.
See, the database and jdk resides on different host.This is where my problem
is.Pls help folks............


Doug Smith

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to

You should be able to use the Oracle JDBC Thin driver
to connect to your Oracle DB. We've done that from
Solaris, Linux, and NT, with no problem.

Doug
--
-- Ethos Interactive
-- Business: http://www.ethos-interactive.com
-- Personal: http://www.arogos.com

Scott Thompson

unread,
Aug 5, 1999, 3:00:00 AM8/5/99
to

Use the Oracle JDBC Thin driver it is at
http://technet.oracle.com/software/download.htm.
That should do it for you.

Regards,

Scott Thompson
scott.t...@worldnet.att.net

AshogaKumar r wrote in message ...

Fredy Fischer

unread,
Aug 8, 1999, 3:00:00 AM8/8/99
to
AshogaKumar r wrote:

> ----------------Anybody help!! lost in the technology zoo---------------
> Pls clear this ??
>
> The database is Oracle 8 and it resides in SUN solaris.I'm running jdk1.2 in
> Windows NT.How can I connect to database.Should I download any driver.What
> driver should I use.Is it a thin or oci.What jdbc protocol shoul I use in my
> program.
> See, the database and jdk resides on different host.This is where my problem
> is.Pls help folks............

Use oracles JDBC-Driver and you are on speed.
Thats one of these CLient/Server-things people is talking about for years..

There is also a tutorial on Sun's Web-pages.

Fredy


0 new messages