From: Graham Vickrage <graham@digitalplanit.com>
To: pgsql-interfaces@postgresql.org
Subject: VB and ODBC
Date: Fri, 27 Apr 2001 12:17:52 +0100
Message-ID: <NDBBJABDILOPAOOMFJHOOEKACJAA.graham@digitalplanit.com> (raw)
I am a new to ODBC and relatively new to VB. I am trying to make a
connection to a postgres 7.0 DB from word via a VB macro. I think I have
installed the ODBC driver correctly (win98) and am trying to make a
connection via the VB module using the following.
Sub ClientOrder()
With ActiveDocument.MailMerge
.MainDocumentType = wdFormLetters
constr = "DSN=PostgreSQL;" _
& "FIL=RedISAM;"
.OpenDataSource Name:="dbname", _
Connection:=constr, SQLStatement:="SELECT Client_order_id FROM
client_order"
End With
End Sub
This does not work I think because of the .OpenDataSource Name:="dbname". In
other examples (ie access) it points directly the the DB File ie
'c:/somefile.mdb'. How would this work for postgres, is there an equivilant
on the linux box (I think not). Or could someone point me to some examples
of this.
Thanks in advance
Graham
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: graham@digitalplanit.com
Subject: Re: VB and ODBC
In-Reply-To: <NDBBJABDILOPAOOMFJHOOEKACJAA.graham@digitalplanit.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