Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fujitsu NetCOBOL V7 with SQL Server 2000

Status
Not open for further replies.

GilbertoJunior

Programmer
May 3, 2003
4
0
0
BR
Hi,

i will send again and try explain exactly problem happens when i try read the same data in SQL Server 2000 at Machine with Windows 2000 Server SP3.

I need test the LOCK of SQL Server. In native files, when i try read a registry with the open I-O clause, the FILE STATUS of this file, return the code "93" or "99". Well, i´m trying get this STATUS of SQL Server, but i don´t get! How to i´m doing this:

EXEC SQL
DECLARE EDT CURSOR FOR
SELECT CODIGO, DESCRICAO FROM NATUREZAS WHERE CODIGO = 16
END-EXEC
*=================================================================
* DEFINE ACTION WHEN AN 'SQLERROR' EXCEPTION OCCURS
*=================================================================
EXEC SQL
WHENEVER SQLERROR GO TO :p-END (according with explanations of Brad, but LOCK is NOT A ERROR, correct? )
END-EXEC.
*=================================================================
* RECEIVE THE NUMBER OF ITEMS IN THE TABLE BY USING THE COUNT FUNCTION.
*=================================================================
EXEC SQL
OPEN EDT
END-EXEC.
EXEC SQL
FETCH EDT INTO :TNAT-CODIGO, :TNAT-DESCRICAO
END-EXEC
DISPLAY SQLCODE SQLSTATE SQLMSG AT 2101

What´s happen. When two users, access for the same data the LOCK occurs in the SQL and my application stops in a FETCH clause. If the nobody user not liberate this data, my application don´t goback for my controller. How to resolve this?!

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top