PowerBuilder – SQL Native Client and DisableBind

Posted on Monday, March 19th, 2012 at 5:51 pm in

Okay so you are upgrading your application, perhaps using the latest version of PowerBuilder (12.5) and SQL Server (2008 R2), and decide to use the SQL Native Client (SNC) to take advantage of new features in the database. Now like many organizations which use Microsoft SQL Server, you may have gone to OLE DB in the distant past (say around PB v7 days) for any number of reasons.

Something to look out for is the Disable Bind setting in your connection string. In OLEDB the default is DisbleBind=1 which disables the binding. For the SNC the default is DisableBind=0 which tells Powerbuilder to bind input parameters to a compiled SQL statement. More information can be found at the following Sybase link.

You might also be interested in

1 Comment

Add your comment

  1. aoganes - October 21, 2013 at 3:22 pm

    Hello,
    We currently use an ODBC MP DSN connection to NonstopSQL for our classic client/server application.
    We connect using:
    DBMS=ODBC

    DbParm= “ConnectString=’DSN=” + ls_DSN +”;UID=” ls_userid “;PWD=” + ls_password + “‘,DISABLEBIND=1″

    For NonStopSQL we use NonstopSLQ driver 2.10.20508.18 HP

    All that works perfectly with PB805 but after migration to PB12.5 classic, the SQLBindParameter with return code -1

    It seems that My migrated application is unable to bind input parameters to compiled SQL statement?

    Error SQLSTATE = S1004

    Any ideas would be greatly appreciated

    thanks
    PB125 13dc-bf8 ENTER SQLPrepareW

    HSTMT 0ADD38B8

    WCHAR * 0x0B7C7638 Migration issue PowerBuilder 12.5 “{call MANAGER.SP_GESTION_VERSION(? , ? )}\ 0″

    SDWORD -3

    PB125 13dc-bf8 EXIT SQLPrepareW with return code 0 (SQL_SUCCESS)

    HSTMT 0ADD38B8

    WCHAR * 0x0B7C7638 Migration issue PowerBuilder 12.5 “{call MANAGER.SP_GESTION_VERSION(? , ? )}\ 0″

    SDWORD -3

    PB125 13dc-bf8 ENTER SQLDescribeParam

    HSTMT 0ADD38B8

    UWORD 1

    SWORD * 0x0012BE64

    SQLULEN * 0x0012BE6C

    SWORD * 0x0012BE3C

    SWORD * 0x0012BE20

    PB125 13dc-bf8 EXIT SQLDescribeParam with return code 0 (SQL_SUCCESS)

    HSTMT 0ADD38B8

    UWORD 1

    SWORD * 0x0012BE64 (0)

    SQLULEN * 0x0012BE6C (0)

    SWORD * 0x0012BE3C (0)

    SWORD * 0x0012BE20 (2)

    PB125 13dc-bf8 ENTER SQLBindParameter

    HSTMT 0ADD38B8

    UWORD 1

    SWORD 1

    SQLULEN 32767

    SWORD 0

    PTR 0x0BAF2020

    SQLLEN 0

    SQLLEN * 0x0AA50C50

    DIAG Migration issue PowerBuilder 12.5 Migration issue PowerBuilder 12.5[Gestionnaire de pilotes ODBC] Type de données SQL hors limites (0)

Leave a Reply

Top