BUG #14386: Run-time error '3018' with psqlODBC Driver using VB6 and DAO

Started by Nonameover 9 years ago1 messagesbugs
Jump to latest
#1Noname
mg@bts.co.uk

The following bug has been logged on the website:

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

I have installed
https://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc_09_05_0400-x86.zip
on a Windows 7 Professional (SP1) operating system.I created ODBC DSNs for
both PostgreSQL ANSI and PostgreSQL UNICODE.
I ran a simple test to select data from a table.

Private Sub Form_Load()
Dim str As String
Dim db As Database
Set db = OpenDatabase("", True, False,
"ODBC;DATABASE=MyDatabase;UID=MyUserID;PWD=MyPassword;DSN=PostgreSQL35W")

Dim rs As DAO.Recordset
Set rs = db.OpenRecordset("select * from configitems")

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

rs.Close

End Sub

The OpenRecordset throws error
Run-time error '3018' Could not find field.

I am using the Microsoft DAO 3.6 Object Library.
If I run the same select and psqlodbc drivers with VB6 and ADO it works
OK.

If I run the DAO test with driver "Devart ODBC Driver for PostgreSQL" it
works OK.

VB6 is Microsoft Visual Basic 6.0(SP6).

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