The error EOLEDBError with message 'QueryInterface failed' when i execute this simple query:
Code: Select all
var cmd : TDBXCommand;
reader: TDBXReader;
begin
cmd := getDBXCommand;
cmd.Text := 'SELECT i.id_instituicao FROM dbo.gc1_ac_instituicao i WHERE i.id_cliente_theossystem = '+IntToStr(id);
reader := cmd.ExecuteQuery;
if reader.Next then
Result := reader.Value['id_instituicao'].AsInt32
else
Result := 0;