Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007

    Unanswered: ODBC connection locks table during select query

    Hi All,

    First post an all..

    I'm currently working on a small app using VBA within Access to Select data from a table in a Sybase server.
    The connection is using ODBC.

    Now I've been told that when I run a select statement I am locking the table by default for updates, not as this is a reporting server and the updates are falling behind, I am not flavour of the month at the moment.

    I've been told that the ODBC driver uses HOLDLOCK as a default for it's connection. Is there anyway that I can force it not to lock the table?

    I am using a DNS Less connection as below..

    oConn.Open "Driver={SYBASE ASE ODBC Driver v4.2};NetworkAddress=servername,5030;UID=someone;P WD=something;DB=somedb"

    tmpSQL = "SELECT somestuff from sometable... "
    oConn.CommandTimeout = 30000
    oRst.Open tmpSQL, oConn, adOpenForwardOnly, adLockReadOnly

    Once I've parsed the data I close the recordset/connection.


    Any ideas will be gratefully received.

  2. #2
    Join Date
    Jul 2007

    Been doing some investigation and found that there is a setting called 'NOLOCK' which might be what I need, but am not sure.

    Any one be able to help me with this?

    Think of it as a challenge.. the DBA's here at work have tried and failed, lets see what you guys (and girls) can do.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts