Page 1 of 1

EOLEDBError with message 'QueryInterface failed'.[OK]

Posted: Mon 13 May 2013 19:02
by rafakwolf
Hello...

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; 
Thanks in advance.

Re: EOLEDBError with message 'QueryInterface failed'.

Posted: Tue 14 May 2013 14:17
by AndreyZ
Hello,

I cannot reproduce the problem. Please specify the following:
- the exact version of your IDE;
- the exact version of dbExpress driver for SQL Server you are using;
- the exact version of your SQL Server server and client.

Re: EOLEDBError with message 'QueryInterface failed'.

Posted: Tue 14 May 2013 18:28
by rafakwolf
Hello...

Delphi version = Xe3 update 2.

Devart Driver Version = 6.1.2.0

sql server native Client DLL = 2007.100.5500.0

thanks and waiting

Re: EOLEDBError with message 'QueryInterface failed'.

Posted: Wed 15 May 2013 10:20
by AndreyZ
Unfortunately, I still cannot reproduce the problem. Please try creating a small sample that demonstrates this problem and send it to andreyz*devart*com , including the script to create and fill the gc1_ac_instituicao table.

Re: EOLEDBError with message 'QueryInterface failed'. [RESOLVED]

Posted: Mon 20 May 2013 11:20
by rafakwolf
Hello...

my problem is solved...

in this line "cmd := getDBXCommand;"

reuse TDBXCommand object does not works...

but when I created a new one every execution, it works...

thanks!

Re: EOLEDBError with message 'QueryInterface failed'.[OK]

Posted: Mon 20 May 2013 12:49
by AndreyZ
It's good to see that you have found a solution. If any other questions come up, please contact us.