From: | John Edens <edensjc(at)sfasu(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | How to configure for remote TCP/IP client conncections using MS Visual Basic OLE DB calls and PostgreSQL dll's? |
Date: | 2011-03-09 16:30:37 |
Message-ID: | 001301cbde77$5297b6a0$f7c723e0$@sfasu.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Edmundo Robles L. | 2011-03-09 16:42:18 | about memory size reported by system. |
Previous Message | Adrian Klaver | 2011-03-09 15:42:12 | Re: Why length(to_char(1::integer, '9')) = 2 ? |