in reply to Re: Win32::ODBC FetchRow
in thread Win32::ODBC FetchRow

Thanks! You're right, this is a much different version. When I tried to use it, I got an error that it could not make the connection. I think it is so old it requires an older ODBC.DLL, and I'm afraid that will be too different to be useful.

So I studied the FetchRow code in the two versions of Win32::ODBC, and got nowhere! They both call ODBCFetch (in the DLL). The new version has a second argument, the one that is supposed to invoke SQLExtendedFetch. But removing this argument entirely *still* called SQLExtendedFetch.

I think it is the ODBC.DLL that determines which Fetch to use, based on whether there are arguments, so I just don't see why SQLFetch is NOT being used when there are no arguments.

I've tried to force ODBC.DLL to use SQLFetch, which should be the normal case. I've studied all the connection options and tried setting various cursors to no avail.

This is a shame, because it means the CodeBase driver cannot be used with Perl. It also seems to mean that all apps that use of Win32::ODBC are using extended fetch when they could be using the simpler fetch.

Many thanks for your help. I would say Win32::ODBC is just not a serious product.

Stephen

Replies are listed 'Best First'.
Re^3: Win32::ODBC FetchRow
by doowah2004 (Monk) on Sep 01, 2004 at 20:27 UTC
    Stephen Toney,

    Did follow the install directions:

    T O I N S T A L L T H I S B E A S T : ========================================= 1) You will need to dump the ODBC.PM file into the \PERL\LIB\WIN32\ di +rectory. 2) You need to copy either ODBC105.PLL or ODBC106.PLL (depending on yo +ur version of Win32 Perl's build number. Run: perl -v to check whic +h build you have) into \PERL\LIB\AUTO\WIN32\ODBC\ODBC.PLL.\ **** Notice that we are changing the name to ODBC.PLL!!!!


    If not then it surely will not work. (Though it may not work even if you did). If that does not work, I am all out of suggestions.

    Cameron
      Well, no, I didn't want to install such an old DLL! That could result in any number of problems down the road. This is a large and complex app with lots of queries and updating, and I just can't risk it.

      Now I'm looking into DBI::ODBC to access the CodeBase driver, in the hopes that it will use SQLFetch instead of SQLExtendedFetch.

      Many thanks for all your help! It's much appreciated.

      Stephen