Connecting Tech Pros Worldwide Forums | Help | Site Map

PGOLEDB connection from visual basic 6

Newbie
 
Join Date: Nov 2006
Posts: 5
#1: Oct 16 '08
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.PgSession
Set cn = New PGOLEDBLib.PgSession

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

So I also tried
Dim cn As PGOLEDBLib.PgSession
Set cn = createobject("PGOLEDBLib.PgSession")

and received the exact same error

Does nobody use PostGreSQL on windows with OLEDB?

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#2: Oct 24 '08

re: PGOLEDB connection from visual basic 6


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