Can anyone help me with this.

In the main thread of my program i've got a piece of code like this:

rs:=CreateOleObject('ADODB.Recordset');
rs.activeconnection:='dsn=aDSN;';
rs.source:='SELECT blabla...';
rs.cursortype:=3;
rs.open
..
..
..
rs.close
rs:=unassigned;

Works fine. Also calling rs.close closes the recordset as well as the associated connection (verify this by disappear of the ldb lock file).

When I put exactly the same code in a thread, it still works fine, but the associated connection does not close (the ldb file doesn't disappear).
To close the connection I have to call

rs.activeconnection.close;

Can anyone tell me why ADO behaves differently in a thread and in the main thread?

Thanks!