pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pragadheeswaran gopalakrishnan <pragadheeswaran@gmail.com>
To: pgsql-odbc@postgresql.org
Subject: How To Connect PostgreSQL thru VB without DSN
Date: Sat, 18 Mar 2006 18:56:52 +0530
Message-ID: <fc163d500603180526s51e63230u@mail.gmail.com> (raw)

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


view thread (4+ messages)  latest in thread

Message-ID: <fc163d500603180526s51e63230u@mail.gmail.com>
Permalink:  ../fc163d500603180526s51e63230u@mail.gmail.com/
Also on:    postgresql.org/message-id/fc163d500603180526s51e63230u@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: pragadheeswaran@gmail.com
  Subject: Re: How To Connect PostgreSQL thru VB without DSN
  In-Reply-To: <fc163d500603180526s51e63230u@mail.gmail.com>
  References: <fc163d500603180526s51e63230u@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox