Hi Joyce,
Did you consider using stored procedures instead?
>The following is an excerpt from a FoxPro program that uses "SET TEXTMERGE ON NOSHOW" and SQL Pass-thru to execute a cursor on SQL Server that updates one field of the cursor (from a table in TEMPDB). This query works (updating all rows) when executed directly in Query Analyzer. However, the same code run within a FoxPro program will update a variable number of rows each time I test it. Example, first run 25 rows modified, second run 27 rows updated, etc. Its interesting that the number of rows updated varies with each subsequent test run. For some reason, @@fetch_status is no longer 0, even though it hasn't updated all records.
>
<snip>
--sb--