Hi guys, some assistance on the following will be highly welcome.
Latest RO DA Server Delphi.
Delphi Berlin Update 2.
I’m doing a custom SQL on the schema that looks like:
‘
SELECT [TABLE1].[FIELD1], [TABLE1].[FIELD2], [TABLE1].[FIELD3]
FROM [TABLE1] INNER JOIN [TABLE2] ON [TABLE1].[FIELD1] = [TABLE2].[FIELD1]
WHERE {WHERE}
’
I want to use a field on table2 to filter the results, basically i want to do a Table2.Field2 = some value on the where clause.
The targettable will be [TABLE1] in case of any updates.
Now on DataAbstract service I have allowAllDynamicFields set to true.
On the client side I’m using an expression like
MemDataTable.DynamicWhere.Expression :=
MemDataTable.DynamicWhere.NewBinaryExpression(
MemDataTable.DynamicWhere.NewField(‘TABLE2’,‘FIELD2’),
MemDataTable.DynamicWhere.DynamicWhere.NewConstant(ID,datInteger), dboEqual);
It is unable to execute the query saying something like Field2 can not be used on the where clause. Whats wrong?
Additionally, what is the equivalent of CreateDataSet on a MemDataTable?
If I want to do additions on a table, and i dont want to open the table and bring all the records because it will bring too much data back to the client do I have to always include some WHERE clause with some invalid value so I can open it? or Could I use something like createdataset on TClientDataSet that will allow me to insert values without having to do the above?
Thank you in advance.