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