Bien, a simple vista ya veo un problema:
Código:
CONEXIONES.conexion.IBQuery1.open;
SetLength(BtProductos, CONEXIONES.conexion.IBQuery1.RecordCount);
Supongo que BtProductos en un array de longitud variable y estás asignándole la longitud de los registros que ha devuelto la consulta,
pues bien, en sql no es así, si quieres realmente saber la cantidad de registros debes ir al último del mismo o hacer un select count()
Tal y como está tu código, deberías de hacer algo así:
Código:
CONEXIONES.conexion.IBQuery1.open;
CONEXIONES.conexion.IBQuery1.Last;
SetLength(BtProductos, CONEXIONES.conexion.IBQuery1.RecordCount) ;
CONEXIONES.conexion.IBQuery1.First;