User Tools

Site Tools


prop_orderalltables.htm
Navigation:  SQL Driver Properties(General) >====== PROP:OrderAllTables ====== Previous pageReturn to chapter overviewNext page

Setting PROP:OrderAllTables to True forces the SQL Accelerator driver to use linking fields and secondary files' key component fields, as well as the primary file's key component fields, in the ORDER BY clause it sends to the server. You may need this switch if you are using a Clarion VIEW that joins multiple tables. By default (View{PROP:OrderAllTables}=FALSE), the SQL Accelerator driver includes only the primary file's key components in the ORDER BY clause it sends to the SQL server.

For example:

BRW1::View:Browse  VIEW(Customer)

PROJECT(CUST:CustNo)

PROJECT(CUST:Name)

PROJECT(CUST:Zip)

PROJECT(CUST:CustNo)

JOIN(ORD:ByCustomer,CUST:CustNo)

PROJECT(ORD:OrderNo)

PROJECT(ORD:OrderDate)

END

END

CODE

?BRW1::View:Browse{PROP:OrderAllTables} = TRUE

Accessing this VIEW then generates a SELECT statement similar to:

SELECT CustNo,Name,Zip,OrderNo,OrderDate FROM Customer,Ord

WHERE (Customer.CustNo = Ord.CustNo)

ORDER BY CustNo,OrderNo

prop_orderalltables.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1