Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • 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.
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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!!!!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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