alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
361 stars 141 forks source link

DB2 for i: Simple select with empty ResultSet locks table #161

Open bashdi opened 3 years ago

bashdi commented 3 years ago

GoClient OS: Windows and Linux, both 64bit ODBC Driver: iSeries Access ODBC Driver DB: DB2 for i, IBMi v7.3 GoVersion: 1.13

Problem: A simple select which returns an empty resultSet leaves a lock on the table. CRUD operations are still possible but OS400 file operation reports that the file is locked.

System reports a SHRRD-lock:

Shared for read (*SHRRD). The object can be shared with another job if the user does not request exclusive use of the object. That is, another user can request an exclusive-allow-read, shared-for-update, shared-for-read, or shared-no-update lock state.

alexbrainman commented 3 years ago

Sorry @bashdi I cannot help you here.

I know nothing about OS400, DB2 and IBM ODBC Driver. You would have to ask their support instead.

Alex