The TdCommandBuilder uses information contained in the SELECT statement that was used to fill the DataTable to build the SQL statements that will be used to push changes made to the DataTable to the underlying SQL table. It will use the table name contained in the FROM clause and the column names that appear in the select list to construct the SQL statements.
Therefore, the FROM clause of the SELECT statement can only contain a reference to a single table. The SELECT statement must also only refer to columns contained in the table specified in the from clause. Columns that perform calculations are not permitted.
The following are additional rules when using the TdDataAdapter with the TdCommandBuilder:
SELECT cust-id, cust-name, cust-address
FROM customer
WHERE cust-id in (SELECT cust-id FROM invoices WHERE inv-date > '2008-01-01')
Inner, Left, Right, Full, Cross, Outer, Join, GROUP BY,
HAVING, QUALIFY, SAMPLE, WITH, UNION, EXCEPT, MINUS, INTERSECT
select * from ( select * from customers );
select * from customers c join orders o on c.custid = o.custid;
select c.custname, o.itemname from customers c, orders o;
select 'customer id' from customers;
select substring(custname from 3) from customers;
TdCommandBuilder only supports characters that may be represented in the current session character set. It is recommended to use a Unicode session character set while using TdCommandBuilder. For more information see Using TdCommandBuilder with Extended Object Names.
The TdDataAdapter does not support returning identity columns for insert statements to the DataTable while batch operations are enabled. For more information see UpdateBatchSize and Identity Column Support.