Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3RDAl388881 for ; Fri, 27 Apr 2001 09:10:47 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from digitalplanit.wdi.co.uk ([195.13.87.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3RBJl346637 for ; Fri, 27 Apr 2001 07:19:47 -0400 (EDT) (envelope-from graham@digitalplanit.com) Received: from graham (dp0002.demon.co.uk [193.237.187.164]) by digitalplanit.wdi.co.uk (8.9.3/8.9.3) with SMTP id MAA10076 for ; Fri, 27 Apr 2001 12:20:36 GMT From: "Graham Vickrage" To: Subject: VB and ODBC Date: Fri, 27 Apr 2001 12:17:52 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Importance: Normal X-Archive-Number: 200104/123 X-Sequence-Number: 1507 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