Re: your mail

From: Bob Kline <bkline(at)rksystems(dot)com>
To: Aziz ABI <abi(at)mail(dot)cbi(dot)net(dot)ma>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: your mail
Date: 2000-12-13 04:09:34
Message-ID: Pine.LNX.4.10.10012122300450.5451-100000@rksystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Sat, 9 Dec 2000, Aziz ABI wrote:

> Bonjour
>
> Vous pouvez m'aider crer 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(at)rksystems(dot)com
http://www.rksystems.com

In response to

  • at 2000-12-09 14:57:33 from Aziz ABI

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas Lockhart 2000-12-13 05:00:04 Re: JDBC, Timestamp and getting microseconds
Previous Message S.A.Pamungkas 2000-12-13 04:00:48 Storing BLOB from other machine