This SQL CE feature works fine under vbscript, but not under AutoIT. In the vbscript code below, only 1 record is affected, and iRecAffected is correctly set to 1. The value is set by ref. set oCon = createobject("ADODB.Connection") set oRS = createobject("ADODB.Recordset") oCon.Open "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=C:\data\test.sdf;" oRS.CursorLocation = 2 'adUseServer Dim iRecAffected oCon.Execute ("update tests set status = 'nothang' where id = 10", iRecAffected) msgbox