X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 75918D1B53F for ; Thu, 13 Nov 2003 00:01:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 89586-05 for ; Wed, 12 Nov 2003 20:00:49 -0400 (AST) Received: from web20805.mail.yahoo.com (web20805.mail.yahoo.com [216.136.226.194]) by svr1.postgresql.org (Postfix) with SMTP id EA915D1B553 for ; Wed, 12 Nov 2003 19:57:32 -0400 (AST) Message-ID: <20031112235722.47748.qmail@web20805.mail.yahoo.com> Received: from [208.13.35.65] by web20805.mail.yahoo.com via HTTP; Wed, 12 Nov 2003 15:57:22 PST Date: Wed, 12 Nov 2003 15:57:22 -0800 (PST) From: Jeff Eckermann Subject: Re: calling a pg-function from vba (Access 2002) To: Wilhelm Graiss , "'pgsql-odbc@postgresql.org'" In-Reply-To: <40925A3BA1EBD711A35C000102B6E57D06C9B0@BAL_PROXY00> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/77 X-Sequence-Number: 3479 --- Wilhelm Graiss 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