From: | mg(at)bts(dot)co(dot)uk |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #14391: PostgreSQL OLE DB stops psqlODBC from working |
Date: | 2016-10-21 12:35:28 |
Message-ID: | 20161021123528.1423.67547@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 14391
Logged by: Mick Griffin
Email address: mg(at)bts(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | diegojamweg | 2016-10-21 14:38:07 | BUG #14392: Selectting a data base |
Previous Message | olli.marx | 2016-10-21 12:21:54 | BUG #14390: ODBC statement_timeout > psqlODBC 09.05.0210 |