From: Anuj@mannindia.com
To: pgsql-admin@postgresql.org
Subject: Connecting through JdbcOdbcDriver from Servlets
Date: 13 Oct 2000 12:07:01 -0700
Message-ID: <20001013190701.25284.cpmta@c004.sfo.cp.net> (raw)
Hello,
I have written a servlet to connectto a PostgreSQL database on Linux 6.2.
I am using JdbcOdbcDriver. When I am running the servlet from JSWDK on
Windows NT , it works fine .
But when I try to run it from JSWDK on Linux , it gives an exception "No Suitable Driver".
My code is like this:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
DriverManager.getConnection("jdbc:odbc:cards","anuj","")
the .odbc.ini file is kept in "/" directory and it is:
[ODBC Data Sources]
cards = PostgreSQL
[cards]
Driver = /usr/local/pgsql/lib/libpgsqlodbc.so.1
Database = cards
UID = anuj
Host = localhost
Port = 5432
The error is coming in when I try to do getConnection.
If anybody could help me in this, please. I believe there must be something wrong in Configuration,as the same code works from JWSDK on NT.
TIA,
Anuj.
Anuj Paul
_______________________________________
Click here to get your free domain name
and personal portal from NAMEzero(TM):
http://www.namezero.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Anuj@mannindia.com
Subject: Re: Connecting through JdbcOdbcDriver from Servlets
In-Reply-To: <20001013190701.25284.cpmta@c004.sfo.cp.net>
References: <20001013190701.25284.cpmta@c004.sfo.cp.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox