Page 1 of 1

Operation Not Supported

Posted: Fri 03 Nov 2006 12:50
by asceta
Hi all,

I' trying to execute this query without success:

Code: Select all

SELECT ca.identifier, al.title 
FROM cae_courses_activities ca, cae_activities_lang al 
WHERE ca.id=al.activityid AND al.lang='xx' AND ca.parent='/' 
AND (ca.filename='' OR ca.filename IS NULL) 
AND (ca.type='' OR ca.type IS NULL) AND ca.courseid=46 
ORDER BY ca.id
When I execute this query from code using dbexpress SQL Server drivers I get the following exception:

Code: Select all

EDatabaseError: DBX Error: Operation Not Supported
I think the problem is with the 'IS NULL' code. Does the driver support this kind of query?

The same query if executed directly into the SQL Server workd fine.

Thank you

Posted: Fri 03 Nov 2006 12:57
by asceta
Hi Again,

Looking deeper in the code I found that the query is executed OK. The exception throws when I call Query->RecordCount after that query.

Why RecordCount throws an exception?

Thank you

Posted: Fri 03 Nov 2006 13:01
by asceta
Sorry,

I reply to myself. From the borland help:
Reading RecordCount will generate an exception if the dataset can’t 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.
Sorry again :(