pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mg@bts.co.uk
To: pgsql-bugs@postgresql.org
Subject: BUG #14391: PostgreSQL OLE DB stops psqlODBC from working
Date: Fri, 21 Oct 2016 12:35:28 +0000
Message-ID: <20161021123528.1423.67547@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14391
Logged by:          Mick Griffin
Email address:      mg@bts.co.uk
PostgreSQL version: 9.5.4
Operating system:   ubuntu Linux (64)
Description:        

I am developing using VB6 on a Windows 7 Professional (SP1) operating
system. So I am using the 32-bit providers. I have a simple test program
that opens a connection to the database and selects a reocrdset from one
table.

I have installed
https://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc_09_05_0400-x86.zip

This worked OK.

I then installed PgOleDb-1.0.0.20.zip. I.e.Copied PGOLEDB.DLL and LIBPQ.DLL
to C:\Windows\SysWOW64 and ran regsvr32 PGOLEDB.DLL

When I re-ran my test using the psqlODBC it failed.
Run-time error '-2147467259(80004005)'.
Specified driver could not be loaded due to system error 182: (PostgreSQL
Unicode C:\Program Files(x86)\psqlODEB\0905\bin\psqlodbc35w.dll).

When I tried to use PostgreSQL OLE DB with connect string
"Provider=PostgreSQL;Data Source=Server IP Address;location=MyDatabase;User
ID=MyUserl;password=MyPassword;timeout=1000"

I received error:
Run-time error '-2147467259(80004005)'
FATAL: no pg_hba.conf entry for host"nnn.nnn.nnn.nnn", user "MyUser",
database "MyDatabase", SSL off

My PC IP address is configured in pg_hba.conf.

My test program is:
Private Sub Form_Load()
Dim str As String
Dim objCon As ADODB.Connection
Dim objCmd As ADODB.Command
Dim colParams As ADODB.Parameters
Dim objParam As ADODB.Parameter
Dim lngRETURN_VALUE As Long
Dim strSQL As String

    strSQL = "select * from configitems"

    ' Set connection properties and open
    Set objCon = New ADODB.Connection
    objCon.ConnectionString = "Provider=PostgreSQL;Data Source=Server IP
address;location=MyDatabase;User
ID=MyUser;password=MyPassword;timeout=1000"
	objCon.CursorLocation = adUseClient
    objCon.Open

    ' Set command properties
    Set objCmd = New ADODB.Command
    With objCmd
        Set .ActiveConnection = objCon
        .CommandTimeout = m_lngCommandTimeout
        .CommandText = strSQL
        .CommandType = adCmdText
    End With

    ' Execute the stored procedure
    Set objRS = objCmd.Execute

    objRS.MoveFirst
    While Not objRS.EOF
    str = " " & objRS![_key] & " , " & objRS![_value] & ", " &
objRS![_attribute]
    Debug.Print "DATA:" & str
    objRS.MoveNext
    Wend
 
    objRS.Close
    
End Sub








 


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Message-ID: <20161021123528.1423.67547@wrigleys.postgresql.org>
Permalink:  ../20161021123528.1423.67547@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20161021123528.1423.67547@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mg@bts.co.uk
  Subject: Re: BUG #14391: PostgreSQL OLE DB stops psqlODBC from working
  In-Reply-To: <20161021123528.1423.67547@wrigleys.postgresql.org>
  References: <20161021123528.1423.67547@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox