RecordCount is not working ?!

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
ASKtec
Posts: 11
Joined: Thu 29 Jan 2009 14:52

RecordCount is not working ?!

Post by ASKtec » Thu 29 Jan 2009 15:00

Hello,

i have some problems using the RecordCount function with mySQL direct.

I get a exception.

Is there anything wrong in my Code?

Code: Select all

       Form1.SQLQueryReminder.Active := false;
          Form1.SQLQueryReminder.SQL.Clear;
          Form1.SQLQueryReminder.SQL.Add(sql);
          Form1.SQLQueryReminder.Active := true;
          RemCount := Form1.SQLQueryReminder.RecordCount;    <= here i get the exception !
          while not Form1.SQLQueryReminder.Eof do
                begin
                   // do something :)

                   Form1.SQLQueryReminder.Next;
                end;
I use the latest Release 4.40.14 from 20-Jan-09.

Thanks....

fulopattila122
Posts: 9
Joined: Wed 28 Nov 2007 15:57

Post by fulopattila122 » Thu 29 Jan 2009 15:26

What's the exact Exception Error message?

ASKtec
Posts: 11
Joined: Thu 29 Jan 2009 14:52

Post by ASKtec » Thu 29 Jan 2009 15:56

Here is the message in German. I use a german Delphi 2007

Exception-Klasse EDatabaseError mit Meldung '[0x0005]: Operation wird nicht unterstützt'.

fulopattila122
Posts: 9
Joined: Wed 28 Nov 2007 15:57

Post by fulopattila122 » Thu 29 Jan 2009 16:17

kein problem ;)

this is "Operation not supported" in english.

A few years ago I also had issues with it, and as far as I remember, I eventually had to avoid using RecordCount. I think it's related to dbExpress not specially to Devart's driver, however I might be wrong.

Please read this: http://dn.codegear.com/article/28494

What you can safely use on Unidirectional dataset's like TSQLQuery is First and Next, but AFAIK Last and Prior might be problematic too.

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 30 Jan 2009 13:09

This problem is caused by the specificity of dbExpress and does not depend from DbxMda.

Post Reply