Symptom

  • This document explains how to prevent from getting locks in a PowerBuilder application when the transaction isolation level is set to READ COMMITTED at the database level

Environment

  • PowerBuilder
  • Microsoft SQL Server 2008
  • Microsoft SQL Server Native Client (SNC) for SQL Server 2008

Cause

  • At the client level, Lock database parameter was not specified in the Transaction object properties

Resolution

  • Set the Lock value to RC for a SNC native database interface, even though it is the default value. For instance:

SQLCA.DBMS="SNC SQL Native Client(OLE DB)"
SQLCA.ServerName="XXX"
SQLCA.LogId="YYY"
SQLCA.LogPass="ZZZ"
SQLCA.DBParm="Provider='SQLNCLI11',Database='MySQLServerDB',DelimitIdentifier=1,StaticBind=0,DisableBind=0,NCharBind=0"
SQLCA.Lock ='RC'

3
2