PGOLEDB connection from visual basic 6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ferguslogic
    New Member
    • Nov 2006
    • 5

    PGOLEDB connection from visual basic 6

    Hey guys,

    Is anybody at all using the PGOLEDB for PostGreSQL on Windows ?
    I google this and i come up completely empty as far as code examples or any documentation etc.

    Does anybody know how to connect to postgresql using the postgres oledb connection from visual basic 6?



    Here is what I have tried

    I reference the PGOLEDB.dll file

    and then I try to instantiate an object

    Dim cn As PGOLEDBLib.PgSe ssion
    Set cn = New PGOLEDBLib.PgSe ssion

    As soon as it hits the Set line it throws ActiveX object cannot create object.

    So I also tried
    Dim cn As PGOLEDBLib.PgSe ssion
    Set cn = createobject("P GOLEDBLib.PgSes sion")

    and received the exact same error

    Does nobody use PostGreSQL on windows with OLEDB?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Please find the connection string here and use ADO to connect to database from VB.

    Comment

    Working...