Re: calling a pg-function from vba (Access 2002) - Mailing list pgsql-odbc

From Jeff Eckermann
Subject Re: calling a pg-function from vba (Access 2002)
Date
Msg-id 20031112235722.47748.qmail@web20805.mail.yahoo.com
Whole thread Raw
In response to calling a pg-function from vba (Access 2002)  (Wilhelm Graiss <Wilhelm.Graiss@bal.bmlfuw.gv.at>)
List pgsql-odbc
--- Wilhelm Graiss <Wilhelm.Graiss@bal.bmlfuw.gv.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

pgsql-odbc by date:

Previous
From: Wilhelm Graiss
Date:
Subject: calling a pg-function from vba (Access 2002)
Next
From: "Philippe Lang"
Date:
Subject: Re: calling a pg-function from vba (Access 2002)