• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 522
  • Last Modified:

How do I connect to a PostgreSQL database using MS Access 2000 ?

How do I connect to a PostgreSQL database that is resided on a
Linux computer using Microsoft Access 2000 on Windows ?

Essentially, I am using Access 2000 as a front-end and PostgreSQL as a back-end.
I am using Access 2000 to facilitate complex query using the graphical method.

Please show it to me step by step how to do it. I think I need to use
ODBC that is built-in to MS Access 2000.

Location of PostgreSQL database:

Name of PostgreSQL database:
  • 4
  • 4
1 Solution
You have to configure the PostgreSQL server on the Linux machine to allow connections from a remote computer using TCP/IP. Have you done so already? In particular, you have to modify the default pg_hba.conf and postgresql.conf files that are installed with the server software.

Once that part is working, you have to create an ODBC data source that connects to the target database. You can download the ODBC driver here:


Unzip that and install the file that's included. Once you have the data source created, you should be able to use Access to query your database. There's a good article at this URL:


However, the links to the PostgreSQL site seem to be outdated. If you need more help, please post some more information about PostgreSQL configuration -- in particular, post copies of pg_hba.conf and postgresql.conf. How familiar are you with PostgreSQL?
lin100Author Commented:
Hi rjkimble. Thank you for your help. Below are the two files in my
Linux computer.

Linux computer IP:
Windows computer IP:

Windows is obtaining a DHCP address from the Linux computer
Please list the configuration for the two files so that I could just cut and
paste to it and connect to the database.
vi /var/postgresql/pg_hba.conf


    local      all                                                             trust
    host      all        trust

vi /var/postgresql/postgresql.conf

Everything is commented out.
If you want to be able to connect from any machine on your network, add this line to pg_hba.conf:

    host      all          trust

I suggest you read up on PostgreSQL security in order to understand the various security issues involved. For more info, look at:


To enable TCP/IP, add this line to postgresql.conf:

tcpip_socket = true

Be sure to restart your PostgreSQL server after making these changes. If you have any more questions, please post them here.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

lin100Author Commented:
Hi rjkimble.

I downloaded the ODBC driver at the site below

If I launches Access 2000, what quick test can I perform to see if the ODBC driver is working properly ?

You said
"Once you have the data source created, you should be able to use Access to query your database."

How do you create the dat source ? Is it just create some blank tables and then tried to connect that blank table to PostGres ?
Depending on what Windows version you're running, there should be a control panel icon for data sources. That's where you define ODBC data sources. Make a "system" source if you can. That way all the users on your machine will be able to see it. I hardly ever run Windows, however. Here is a link to a Microsoft article on how to set up an ODBC data source:


I think the procedure is similar no matter what version of Windows you're running.
lin100Author Commented:
Hi rjkimble. Here is what I have done.

1) in file pg_hba.conf:
    host      all          trust

2) In file postgresql.conf:
    tcpip_socket = true

3) I did setup a "system" source  in ODBC

    Database: apache (This is the name my database)
    User Name: apache (must login as apache user to use PostGres)
    Port: 5432
    Password: abcd (Is this the password to gain access to the database ? or
                              or is it the password for root ? )

4) Now that I am in Access 2000, how do I access this database ? I do not see anything in Access
3) You must use whatever password the apache user uses to connect.

4) I don't know. I don't use Access, and I don't have it installed anywhere so that I could check it out. I'm sure there must explanations somewhere on how to connect to an ODBC data source using Access. Maybe you should post a question in the MS Access topic area: http://www.experts-exchange.com/Databases/MS_Access/
lin100Author Commented:
Thank you  rjkimble  for your help. You got an A!!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now