From: | "pragadheeswaran gopalakrishnan" <pragadheeswaran(at)gmail(dot)com> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | How To Connect PostgreSQL thru VB without DSN |
Date: | 2006-03-18 13:26:52 |
Message-ID: | fc163d500603180526s51e63230u@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | noreply | 2006-03-18 17:26:23 | [ psqlodbc-Bugs-1000589 ] data source configuration dialog page switching bugs |
Previous Message | Bart Samwel | 2006-03-18 11:09:05 | Re: Most recent driver aborts transaction after one error |