BDE/IDAPI, SQL-LINK LIVE RESULT SETS Question: The Delphi docs state that a live query cannot have an ORDER BY clause. The readme.txt it says just the opposite!: "Additional information about updatable SQL queries: o The online help on Syntax Requirements for a Live Result Set should state that ORDER BY clauses are allowed in updatable queries. o The online help on Syntax Requirements for a Live Result Set" Answer: The restriction on ORDER BY in the documentation/online-help is a mistake. HAVING is, however, not allowed in a live result set. For example: select * from "dbo.customer" group by Customer_No having 2135 would not be allowed if RequestLive is set to true ( and if set to false the quotes would need to be removed from dbo.customer [SEE BELOW] ) Please note: The following does not work as it *appears* to be documented in the Delphi readme.txt. SELECT * from "customer.db" order by company Order by is *currently* not supported on local tables. The correction in the Delphi readme only refers to remote date. The documentation and help files are correct for local data when they refer to live data requests. Question: I cannot set TQuery RequestLive true if i have an order by clause in the select statement. Is it possible to have an updatable query with an order by on pdox tables? Answer: In Delphi try this on a TQuery: Set Active to false, TStrings to: SELECT Customer_No FROM "dbo.customer" ORDER BY Customer_No Set RequestLive to false, On a button or the OnCreate event of the Form use this: myTQuery.active:=true; myDataSource.enabled:=true; When RequestLive is false the SQL statement is sent right to the server: SYBASE does not understand qualified tablenames so "dbo.customer" would generate an error: Project MYPROJ.EXE raised exception class EDBEngineError with message ‘General SQL error. Incorrect syntax near ‘dbo.customer’. Process stopped. Use Step or Run to continue. If run as an exe and not from Delphi the message: ‘General SQL error. Incorrect syntax near ‘dbo.customer’’. is generated. The solution is to remove the quotes. If RequestLive is set to true then the Interbase SQL parser is used and you must qualify the tablename and surround it with quotes. To help explain why the quotes are required try browsing for Interbase tables in the Borland Database Desktop, Paradox or dBASE for Windows. You'll notice that table qualifiers (owner names) are not used in the available list of tables. Idapi checks for table ownership when a live result is requested hence the owner requirment. Obviously the user/login name used to begin the session would require adequate rights to the requested table. When switching back and forth between RequestLive true | false it is easy to bump up against errors when trying to run your form.