Page 1 of 1

RecordCount is not working ?!

Posted: Thu 29 Jan 2009 15:00
by ASKtec
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....

Posted: Thu 29 Jan 2009 15:26
by fulopattila122
What's the exact Exception Error message?

Posted: Thu 29 Jan 2009 15:56
by ASKtec
Here is the message in German. I use a german Delphi 2007

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

Posted: Thu 29 Jan 2009 16:17
by fulopattila122
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.

Posted: Fri 30 Jan 2009 13:09
by Dimon
This problem is caused by the specificity of dbExpress and does not depend from DbxMda.