How To Connect PostgreSQL thru VB without DSN - Mailing list pgsql-odbc

From pragadheeswaran gopalakrishnan
Subject How To Connect PostgreSQL thru VB without DSN
Date
Msg-id fc163d500603180526s51e63230u@mail.gmail.com
Whole thread Raw
Responses Re: How To Connect PostgreSQL thru VB without DSN  ("Campbell, Greg" <greg.campbell@us.michelin.com>)
List pgsql-odbc
Hi,

I want to know How To Connect  PostgreSQL thru VB throughDSN-less connection.

I used the following syntax
Private Sub ConnectDB
On Error GoTo EH
Dim c As New ADODB.Connection
c.open "DRIVER={PostgreSQL};SERVER=200.200.200.1 ;port=5432;DATABASE=MyDB;UID=postgres;PWD=postgres;"
Exit Sub
EH:
Msgbox Err.Description,vbcritical,"Error Info"
End Sub

The  IP address of the machine, where PostgreSQL is installed, is 200.200.200.1  which i noted from the Mynetwork places ---> properties ---> Local Area Connection ---> TCP/IP Internet Protocol properties.

The operating system installed is Win-2000

But , the above code gives error as [Microsoft][ODBC Driver Manager] Data Source name not found or default driver not specified.

I guess the value for the SERVER parameter in the above connection string code will be wrong. Please guide me.

--
G.Pragadheeswaran

pgsql-odbc by date:

Previous
From: Bart Samwel
Date:
Subject: Re: Most recent driver aborts transaction after one error
Next
From:
Date:
Subject: [ psqlodbc-Bugs-1000589 ] data source configuration dialog page switching bugs