odbcRowSource()

From: Cedar Cox <cedarc(at)visionforisrael(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: odbcRowSource()
Date: 2001-04-14 20:01:42
Message-ID: Pine.LNX.4.21.0104142251170.12674-101000@nanu.visionforisrael.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Sorry for the delay...

This is to be considered a beta release, but I believe it works fine.

Please also read the documentation in README.txt (I wrote it quickly..
feel free to correct mistakes). Enjoy!

-Cedar
---------------------------

---
--- odbcRowSource() features
---
odbcRowSource() is a fast alternative to using passthrough queries as the
row source for list and combo boxes. The reason it is so fast it because
all queries go through ODBCDirect and bypass the Jet engine. It also
eliminates the problem of storing passwords in the connect strings of
persistent queries (stored on disk). Optionally, you can share the
internal recordsets among controls that use the same SQL as their
RowSource. You can limit sharing to one form or share across the entire
application.

---
--- Initial setup
---
'odbcRowSource' - Place the code in a module (probably best in a global
module).

'odbcConn' - You must also have a odbcConn connection variable (again,
best as a global variable. You may want to set "Option Private
Module" wherever you define this.

'makeOdbcConn()' - Provided to actually make the connection through an
ODBCDirect workspace. You will probably want to call 'makeOdbcConn()'
from a login form.

'devOdbcConn()' - Use this for as a quick start so you don't have to
create a login form. Change it to match your DSN, username and password,
and then call it from 'Form_Load()' for your form.

---
--- Usage
---
To set up the list box or combo box, go to the control's properties and
put in "odbcRowSource" for RowSourceType. Put the SQL in RowSource (note,
this will be sent as is to the back end, just like a passthrough
query). That's it!

If migrating from passthrough queries, use the SQL from the query in
RowSource.

Attachment Content-Type Size
odbcRowSource.zip application/zip 5.7 KB

Browse pgsql-odbc by date

  From Date Subject
Next Message Braxton Beyer 2001-04-16 18:26:09 odbc driver
Previous Message qspeng 2001-04-13 02:16:23 sorry, it's a test