EOLEDBError with message 'QueryInterface failed'.[OK]

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
rafakwolf
Posts: 8
Joined: Mon 13 May 2013 18:58

EOLEDBError with message 'QueryInterface failed'.[OK]

Post by rafakwolf » Mon 13 May 2013 19:02

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.
Last edited by rafakwolf on Mon 20 May 2013 11:20, edited 1 time in total.

AndreyZ

Re: EOLEDBError with message 'QueryInterface failed'.

Post by AndreyZ » Tue 14 May 2013 14:17

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.

rafakwolf
Posts: 8
Joined: Mon 13 May 2013 18:58

Re: EOLEDBError with message 'QueryInterface failed'.

Post by rafakwolf » Tue 14 May 2013 18:28

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

AndreyZ

Re: EOLEDBError with message 'QueryInterface failed'.

Post by AndreyZ » Wed 15 May 2013 10:20

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.

rafakwolf
Posts: 8
Joined: Mon 13 May 2013 18:58

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

Post by rafakwolf » Mon 20 May 2013 11:20

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!

AndreyZ

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

Post by AndreyZ » Mon 20 May 2013 12:49

It's good to see that you have found a solution. If any other questions come up, please contact us.

Post Reply