How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's? - Mailing list pgsql-general

From John Edens
Subject How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's?
Date
Msg-id 000a01cbde6f$080da840$1828f8c0$@sfasu.edu
Whole thread Raw
Responses Re: How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's?  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general

Hey guys, I'm trying to get a VB program to make a client connection to my PostgreSQL server running on an

Ubuntu 10.10 server.

 

Here's what I've done:

 

Client side - installed and registered the OLE DB .dll's from the PostgreSQL OLE DB Provider project.

 

server side -

 

the configuration described here: https://help.ubuntu.com/10.10/serverguide/C/postgresql.html

 

---------------

Have added this line to postgresql.conf:

 

 

listen_addresses = '*, 144.96.80.35, localhost'

 

I've also tried this as simply:

 

listen_addresses = '144.96.80.35, localhost'

 

also, port = 5432

 

--------------

 

I have added the following to pg_hba.conf:

 

 

# IPv4 local connections:

host    all         all         144.96.80.35  255.255.255.0         md5

local   all     postgres        md5

 

 

--------------

 

I've got the following code going in VB:

 

Public Class Form1

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Const connString As String = "Provider=PostgreSQL; Server=144.96.80.35; User Id=postgres;Password=postgres;"

 

        Dim theOleDBconnection As New OleDb.OleDbConnection

 

        theOleDBconnection.ConnectionString = connString

 

 

        theOleDBconnection.Open()

    End Sub

End Class

 

So when the project opens up, it should make the connection and display the form.

 

What happens is that I get an error...

 

OleDbException was unhandled

 

could not connect to server: Connection refused (0x0000274D/10061)

               Is the server running on host "" and accepting

               TCP/IP connections on port 5432?

 

---------------------------

 

So, obviously I've got something configured incorrectly.

 

I'm troubled that the VB error seems to show a null value for the host. Shouldn't that be the Server value in

the connection string?

 

Thanks to all for any help…

pgsql-general by date:

Previous
From: John Edens
Date:
Subject: How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's?
Next
From: Steve Crawford
Date:
Subject: Re: How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's?