August 5, 2002 at 7:50 am
I moved from Powerbuilder 5 to PB 8; from Sybase to SQL Server 2000 (separate server) using DTS. The following code is executed in PB. After execution, all rows in the table (case_roles) are locked for update. If I change the code and add a 'commit', there are no locks -- of course it locks rows further in the app.
I have reloaded, looked at the ODBC definition, the PB definition and cannot find anything.
Where should I look????
Thanks,
Jim
CODE:
///////////////////////////////////////////////////////////////////////
//
//Initialize Role user object.
//Populate the 'role' definitions structure from the Roles table.
Declare Role_Cur Cursor For
SelectRole_ID,
Role_Descr,
Role_Code
From"dbo"."case_Roles";
Open Role_Cur;
Role_Cnt = 1
Do While SQLCA.SQLCode <> 100
FetchRole_Cur
Into:Roles[Role_Cnt].Role_ID,
:Roles[Role_Cnt].Role_Name,
:Roles[Role_Cnt].Role_Code;
Role_Cnt ++
(above line is Role_Cnt followed by 2 pluses -- didn't show up in the preview)
Loop
Role_Cnt --
Close Role_Cur;
//Commit;
August 23, 2002 at 8:59 am
Jim,
What you're saying doesn't make sense from the code you're showing. As far as SQL Server is concerned, table case_roles should not have any update locks, because you are simply doing a select. Is Powerbuilder doing something really weird?
I would expect the locks to go away upon commit.
Seems you have updated records in case_roles somewhere else in the code and haven't committed them yet.
Hard to say from this viewpoint.
Steve
Steve Miller
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply