Re: calling a pg-function from vba (Access 2002)

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Wilhelm Graiss <Wilhelm(dot)Graiss(at)bal(dot)bmlfuw(dot)gv(dot)at>, "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: calling a pg-function from vba (Access 2002)
Date: 2003-11-12 23:57:22
Message-ID: 20031112235722.47748.qmail@web20805.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

--- Wilhelm Graiss <Wilhelm(dot)Graiss(at)bal(dot)bmlfuw(dot)gv(dot)at>
wrote:
> Hello,
>
> We have a question concerning the vba-code which is
> posted on
>
http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-accessvba:
>
> We have a function in postgres (Version 7.3.2) and
> would like to call it
> from vba on Access 2002 (a.k.a XP) with different
> parameters each time.
>
> We searched the Net and played with the code, but
> with no success. The
> connection to postgres works, the problem is how to
> trigger the "select
> myfunction(param1, param2, param3)" - thing from
> vba...

You need to do a passthrough query. Just supplying a
connection string for your querydef will cause the SQL
to be sent directly to the server, instead of to Jet.
So all you need then is to capture the parameters
according to your preference, construct your query
string and use it to set your sql property.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Philippe Lang 2003-11-13 07:35:44 Re: calling a pg-function from vba (Access 2002)
Previous Message Roberto Pena 2003-11-12 11:53:36 ODBC Drive