Restricted Datatype Attribute Violation in Powerbuilder 7 Application With Oracle 8i ODBC

From: Allen Marshall <arm_at_camsys.com>
Date: 6 Nov 2001 13:50:52 -0800
Message-ID: <c4b94895.0111061350.66fa09bc_at_posting.google.com>


We were stumped by a Restricted Datatype Attribute Violation occurring

       in very ordinary select statements within a PB 7.0.3 application. 
       This only occurred with the Oracle  8i ODBC drivers (multiple versions
       for Oracle 8.1.7 in particular).  We finally abandoned these drivers
       and standardized on PB Intersolv Oracle 8, and things stabilized. 
       However, users continued to clamor for fixing the problem so they
       could use the Oracle ODBC support and not have to install extra
       drivers.

       With some pain, we found that PB was issuing ODBC SQLExtendedFetch
       calls to retrieve rows, presumably for performance reasons, and
       Oracle's ODBCTEST.EXE  showed that Oracle called the ODBC SQLFetch for
       the same initial SQL statement.  Further exploration revealed that
       setting the retrieve factor to 1 for the SQLCA in PB would force PB to
       use SQLFetch instead of SQLExtendedFetch, and presto! problem
       apparently gone.
         
       It appears that newer ODBC drivers, except for Oracle's,  remap
       SQLExtendedFetch calls to a newer function whose name escapes me,
       making this tweak unnecessary.  That is why the PB Intersolv drivers
       worked, I guess, as well as other Merant ODBC drivers we have tested.

       So, as far as we can tell, PB7 doesn't like to use Oracle 8i ODBC with
       BLOCK set to anything other than BLOCK=1.  Check your DBPARM.  Here's
       an example:

       DBParm=connectstring='dsn=or816
       smart;uid=pstest;pwd=******',block=1,delimitidentifier='no'


       Allen
Received on Tue Nov 06 2001 - 22:50:52 CET

Original text of this message