Главная страница | назад





Article #28494: Operation Not Supported error when calling TSQLQuery.RecordCount

Question:

Why am I getting the error 'Operation Not Supported' when calling TSQLQuery.RecordCount?
This error may also be preceded by the exception'ORA-00942: table or view does not exist' in the IDE.

Answer:

You should note from the Delphi help that reading RecordCount will generate an exception if the dataset can not determine the number of records. Do not read RecordCount if:
  The dataset represents stored procedure.
  The dataset represents a query that contains parameters.
  The dataset represents a multi-table join.


If you are not doing any of these and you are still getting the error you should note that the SQL in TSQLQuery can be case sensitive. For example, if your table name shows up in SQL Explorer or in the TableName property of TSQLTable as CUST2 and your query is:
  Select * from cust2
then you may get the error, but if your query is:
  Select * from CUST2
then it should work.

Last Modified: 05-MAR-02