Re: Access2K Form object to use passtrough queries

From: Cedar Cox <cedarc(at)visionforisrael(dot)com>
To: Jean-Michel POURE <jmpoure(at)axitrad(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Access2K Form object to use passtrough queries
Date: 2001-04-09 00:21:04
Message-ID: Pine.LNX.4.21.0104090304060.7556-100000@nanu.visionforisrael.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Yes. I've written a function I call odbcRowSource() that can be used as
the source for list and combo boxes. You put in odbcRowSource as the
RowSourceType and put the sql in RowSource. You must provide some sort of
global connection variable ("odbcConn") which can be through an odbcDirect
workspace. This makes things very fast (I was surprised myself!). If
this is new to you, read help on RowSource, RowSourceType, and using a
function as a rowsource. (You must know at least some Visual Basic).

I hate to hold you in suspense, but my current code has big bugs. I
should be finished with it tomorrow. Two things I'm working on 1. make it
so column heads works, 2. a neat feature that will make sure that for a
given SQL string, only one query is sent to the backend. This of course
would assume that you expect to always get the same results back. If not,
this will have to be disabled. It's useful for us so that's why I'm
putting it in. It can also be spread across your entire Access
application (ie, multiple forms with the same combo box only use one
recordset between them, and therefore possibly only one query throughout
the life of the session). (Note, it is easy to confine this to stay
within a form). One other thing is that you must remember to refresh
things often (this, I think, is very different from a requery.. I'll
experiment tomorrow). If you don't, (for example) two combo boxes that
should display the same thing might end up displaying something different.

-Cedar

ps. this is only for populating your combo box. Other fields and updating
are another story..

On Thu, 5 Apr 2001, Jean-Michel POURE wrote:

> Hello,
>
> Has anyone written an object to use passthrough queries in an Access
> 97/2000 form ?
>
> Need to be like :
> -> getvalues = load data into fields and combo ;
> -> setvalues = update record from fields and combo values.
>
> If anyone has been working on something, do not hesitate to share code ...
> I will post mine when ready.
>
> Greetings from Jean-Michel POURE, Paris

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2001-04-09 01:16:27 Re: access #s_c_h#
Previous Message Hiroshi Inoue 2001-04-08 23:51:09 Re: Help : serious problems with ODBC & Postgresql 7.1 RC2 &Access 2000