From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | <ttpcook(at)hotmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Connecting to postgreSQL |
Date: | 2005-09-23 20:46:25 |
Message-ID: | s3342363.056@gwmta.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Greetings Peter,
Since I haven't noticed any responses here, I'll take a shot at it.
Start with this:
http://jdbc.postgresql.org/documentation/80/index.html
A lot of your questions should be answered in sections 1 through 3.
You do not need to unzip jar files to use the contents -- put the jar
file(s) on the classpath, rather than the directory in which they reside.
I'm not sure how you would use ODBC directly in a Java app, so
your question comes down to using the JDBC driver directly, or using
the JdbcOdbc bridge. Your performance and reliability are almost
certainly going to be better with the JDBC driver. It allows your Java
application to talk to the database directly through a TCP socket.
You will need to configure your postgres back end to allow TCP
connections from the appropriate IP addresses. The default is really
tight security, which disallows everything. You will need to speicify
what connections are allowed in the pg_hba.conf file in your data
directory (assuming a standard installation). Also, in your
postgresql.conf file you will have to mofify the listen_addresses line.
See this for more info:
http://www.postgresql.org/docs/8.0/interactive/index.html
I hope this is helpful.
-Kevin
>>> "Peter Cook" <ttpcook(at)hotmail(dot)com> 09/22/05 7:27 PM >>>
I have a Java Application runnibng on Windows 2000.
Initially it accessed an Access database, and now that I have installed
postgreSQL, I want to configure it to access postgreSQL.
(1) Is there a single document that can take me through the steps, or can
someone give me a simple checklist of what I need to do.
(2) I was using JdbcOdbc to use the Access database, is it possible to use
JdbcOdbc to
access postgreSQL
(3) what are the pros and cons of using JDBC, ODBC and JdbcOdbc
I have a data/jdbc directory with three jar files. I expect I need to unpack
one or all three.
I have included this directory in my CLASSPATH.
I Postmaster appears to be running after system startup because I don't need
to do anything
to fire up pgAdmin.
I read where the -i flag needs to be set for TCP/IP use. How is the
Postmaster started? There must be a
batch file that starts it. I will need to amend the parameters. Also, I see
in one document that
the -i flag is deprecated and the -h flag is prefered.
I hope you can clarify this jumble of discordant information.
I would appreciate your help.
Your sincerely
Peter Cook
_________________________________________________________________
SEEK: Over 80,000 jobs across all industries at Australia's #1 job site.
http://ninemsn.seek.com.au?hotmail
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffrey Tenny | 2005-09-24 19:46:31 | Tracing commits on the server |
Previous Message | Dave Cramer | 2005-09-23 20:02:51 | Re: Connection to unix socket |