pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Lang <aalang@rutgersinsurance.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Re: your mail
Date: Wed, 13 Dec 2000 08:46:50 -0500
Message-ID: <034a01c0650b$251ee040$330a0a0a@6014cwpza006> (raw)
References: <Pine.LNX.4.10.10012122300450.5451-100000@rksystems.com>

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" <bkline@rksystems.com>
To: "Aziz ABI" <abi@mail.cbi.net.ma>
Cc: <pgsql-interfaces@postgresql.org>
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




view thread (25+ messages)  latest in thread

Message-ID: <034a01c0650b$251ee040$330a0a0a@6014cwpza006>
Permalink:  ../034a01c0650b$251ee040$330a0a0a@6014cwpza006/
Also on:    postgresql.org/message-id/034a01c0650b$251ee040$330a0a0a@6014cwpza006

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: aalang@rutgersinsurance.com
  Subject: Re: Re: your mail
  In-Reply-To: <034a01c0650b$251ee040$330a0a0a@6014cwpza006>

* 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