Received: from bush.rutgersinsurance.com (rutgersinsurance.com [38.138.71.194]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBDDh8M85600 for ; Wed, 13 Dec 2000 08:43:08 -0500 (EST) (envelope-from aalang@rutgersinsurance.com) Received: from 6014cwpza006 ([10.10.10.51]) by bush.rutgersinsurance.com (8.9.3/8.9.3) with SMTP id IAA23613 for ; Wed, 13 Dec 2000 08:47:59 -0500 Message-ID: <034a01c0650b$251ee040$330a0a0a@6014cwpza006> From: "Adam Lang" Cc: References: Subject: Re: Re: your mail Date: Wed, 13 Dec 2000 08:46:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200012/105 X-Sequence-Number: 449 For curiosity's sake... why are you using getrows? Much easier to do: dim fd as ADODB.Recordset dim strRow as string do while not rs.EOF strRow = "" for each fd in rs.Fields strRow = strRow & " " & fd.value next debug.Print strRow rs.MoveNext Loop set fd = nothing Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Bob Kline" To: "Aziz ABI" Cc: Sent: Tuesday, December 12, 2000 11:09 PM Subject: [INTERFACES] Re: your mail > On Sat, 9 Dec 2000, Aziz ABI wrote: > > > Bonjour > > > > Vous pouvez m'aider à créer une connexion ODBC à partir par un petit > > module VB. > > > > Merci > > > > Sure. > > 1. Set your pg_hba.conf to allow access from your Windows machine. > 2. Install the ODBC driver for PostgreSQL on that machine. > 3. Set up an ODBC DSN using that driver. > 4. Here's some sample VB code to talk to the database using the DSN: > > Dim rs As ADODB.Recordset > Dim cn As String > Dim rc As Variant > Dim r, c As Integer > Set rs = New ADODB.Recordset > cn = "DSN=pgtest;UID=moi;DATABASE=test" > rs.Open "SELECT * FROM t", cn, , , 1 > Do While Not rs.EOF > rc = rs.GetRows > For r = 0 To UBound(rc, 2) > For c = 0 To UBound(rc, 1) > Debug.Print r & " " & c " " & rc(c, r) > Next c > Next r > Loop > > Hope this help. > > -- > Bob Kline > mailto:bkline@rksystems.com > http://www.rksystems.com