[archive] SQL SELECT Question

[Migrated content. Thread originally posted on 09 March 2007]

Hello
I am running version 6.2 with AcuSQL. I am running a thread in a program that pulls records from a SQL Server table using the following code:

EXEC SQL
DECLARE COBCURDW CURSOR FOR
SELECT COUNT(HDL_PK)
FROM VW_TBL_HANDLERDAILY_WITH_NAMES_FARM WITH (NOLOCK)
WHERE FARM = :SEL-FARM-NUM AND MMYYYY = :SEL-MMYYYY AND
HMMYYYY = :SEL-MMYYYY
FOR READ ONLY
END-EXEC
EXEC SQL
OPEN COBCURDW
END-EXEC
EXEC SQL
FETCH COBCURDW INTO :WS-Count-Weights
END-EXEC
EXEC SQL
CLOSE COBCURDW
END-EXEC

Once this thread is running I cannot seem to stop it programmatically or switch to another thread until the SQL search has completed. Is there any way to stop or interrupt an SQL search or pass a control break to SQL Server?