i got the same error using sdac it was that i created a field in TmsQuery and the query select a temp table and i't does't receive the type of the column and it raise an AV, so you need to pass all the types of all columns.