On 2004.04.26, Tom Jackson <[EMAIL PROTECTED]> wrote:
> A few months back I made a few changes to the nssolid module and called
> it, temporarily nsunixodbc.

Strangely, I was intrigued by your comment that "nsodbc can't use the
UnixODBC driver manager" so I gave it a whack on Linux, and found that
the changes needed to make nsodbc work with nsunixodbc were minimal.

I documented my efforts on the wiki:

    http://panoptic.com/wiki/aolserver/nsodbc

The patch to nsodbc is available as a link from that wiki page.  Once I
do some more testing, I'll commit the changes to CVS.  I'm hoping the
changes that I made can work towards eliminating the need for a separate
nsunixodbc driver.

> I started playing around with this again last week and noticed that you
> cannot issue transactions over odbc via sql commands. You have to signal
> the start of a transaction by changing a connection parameter.
>
> Since this isn't supported in the ns_db api, I added them to the ns_odbc
> command:
> ns_odbc begintransaction $dbHandle
> ns_odbc committransaction $dbHandle
> ns_odbc rollbacktransaction $dbHandle

Here's a handy page describing transactions in ODBC:

    http://www.schemamania.org/jkl/booksonline/SQLBOL70/html/6_050_1.htm

Basically, in order to get "transactions" under ODBC you call
SQLSetConnectAttr and turn autocommit off.  Then, you need to explicitly
commit or rollback using SQLEndTran with SQL_COMMIT or SQL_ROLLBACK.  Is
that what the 3 commands you implemented essentially do?

Although, beingtransaction is really a misnomer -- what you really get
is a [ns_odbc autocommit $boolean].  Unless, you're doing something
different entirely.

> The module is at http://zmbh.com/nsunixodbc/nu.tgz and compiles as
> nu.so, so there is no confusion, and until an accepted name can be
> chosen for the module. I have a gratuitous copy of XP now, so maybe I
> can see if it compiles on win.

Please do me a favor and test nsodbc after applying my patch and see if
it works with UnixODBC on your system.  If so, I'll commit the patch and
implement the transaction-handling commands for ns_odbc, then we can
live with one AOLserver ODBC driver module again.

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to