Thread: pgsql-odbc

pgsql-odbc

From
Minal
Date:
This is my code which I have included to connect to postgresql in SUSE
linux from windows machine.

Dim MyDB As New ADODB.Connection
Dim Rc As New ADODB.Recordset
Private Sub Command1_Click()

With MyDB
  .CursorLocation = adUseClient
  .Open "Provider='PostgreSQL';Database='test';host='10.1.2.86';"

End With

End Sub

I am getting the following error:
"Could not connect to server:connection refused(0x0000274D/10061) is the
server running on the host"" and accepting TCP/IP on port 5432"

I  have modified pg_hba.conf  on the linux server to allow connections
froms other hosts also.
Just dont know what to do??

Minal

Re: pgsql-odbc

From
"Joel Fradkin"
Date:
In the conf file there is a setting to allow tcpip
listen_addresses = '*'    # what IP interface(s) to listen on;
                # defaults to localhost, '*' = any
port = 5432
max_connections = 100

as well as the hba settings you mentioned
host    all         all         192.168.123.121 255.255.255.0       trust

you might try using pgadminIII to confirm you can connect.

My connect looks like
Session("StringConn") =
"DRIVER={PostgreSQL};DATABASE=wazuni;SERVER=192.168.123.121;PORT=5432;UID=po
stgres;PWD=;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersio
ning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0
;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ks
qo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsCh
ar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;Upd
atableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary
=0;UseServerSidePrepare=0"

Joel Fradkin

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305

jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.




-----Original Message-----
From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Minal
Sent: Wednesday, July 13, 2005 4:56 AM
To: pgsql-odbc@postgresql.org
Subject: [ODBC] pgsql-odbc

This is my code which I have included to connect to postgresql in SUSE
linux from windows machine.

Dim MyDB As New ADODB.Connection
Dim Rc As New ADODB.Recordset
Private Sub Command1_Click()

With MyDB
  .CursorLocation = adUseClient
  .Open "Provider='PostgreSQL';Database='test';host='10.1.2.86';"

End With

End Sub

I am getting the following error:
"Could not connect to server:connection refused(0x0000274D/10061) is the
server running on the host"" and accepting TCP/IP on port 5432"

I  have modified pg_hba.conf  on the linux server to allow connections
froms other hosts also.
Just dont know what to do??

Minal

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster