pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Jamal Mazrui <Jamal.Mazrui@fcc.gov>
To: pragadheeswaran gopalakrishnan <pragadheeswaran@gmail.com>
To: pgsql-odbc@postgresql.org
Subject: Re: How To Connect PostgreSQL thru VB without DSN
Date: Mon, 20 Mar 2006 10:59:51 -0500
Message-ID: <A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov> (raw)
For the driver name in the connect string, try {PostgreSQL ANSI} or
{PostgreSQL Unicode}, instead of just {PostgreSQL}. I noticed that the
Windows ODBC administrator inserted this for the driver name.
Unfortunately, the new driver name was not documented in any of the
PostgreSQL documentation I found on ODBC, so it took me hours to debug
this problem.
Regards,
Jamal
-----Original Message-----
From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of pragadheeswaran
gopalakrishnan
Sent: Saturday, March 18, 2006 8:27 AM
To: pgsql-odbc@postgresql.org
Subject: [ODBC] How To Connect PostgreSQL thru VB without DSN
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)
Message-ID: <A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov> Permalink: ../A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov/ Also on: postgresql.org/message-id/A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov ·
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: Jamal.Mazrui@fcc.gov, pragadheeswaran@gmail.com Subject: Re: How To Connect PostgreSQL thru VB without DSN In-Reply-To: <A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov> References: <A79D3F903121D240A2F7580DF0272F6C021FCD9F@P2PXMB07.fccnet.win.fcc.gov> * 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