Operation Not Supported

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
asceta
Posts: 16
Joined: Mon 13 Feb 2006 10:04
Location: Spain

Operation Not Supported

Post by asceta » Fri 03 Nov 2006 12:50

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

asceta
Posts: 16
Joined: Mon 13 Feb 2006 10:04
Location: Spain

Post by asceta » Fri 03 Nov 2006 12:57

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

asceta
Posts: 16
Joined: Mon 13 Feb 2006 10:04
Location: Spain

Post by asceta » Fri 03 Nov 2006 13:01

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 :(

Post Reply