Hi,
when trying use AddWhere and SetOrderBy occurs error.
Ex:
UniTable.SetOrderBy('id');
UniTable.AddWhere('((id = 1)');
UniTable.AddWhere('(name = '''test'''))');
Result Query:
SELECT * FROM table
WHERE ((id = 1) ORDER BY id (name = 'test'))
How can I fix this problem?
Thanks!
AddWhere Error
Hello,
A valid SQL query should be received after adding any of the operators (ORDER BY, WHERE). In the code sample you've sent us, the SQL query received after calling the AddWhere is invalid. To solve this problem, you should either add the WHERE section using one operator, or remove all brackets, or call SetOrderBy after adding the WHERE section completely.
A valid SQL query should be received after adding any of the operators (ORDER BY, WHERE). In the code sample you've sent us, the SQL query received after calling the AddWhere is invalid. To solve this problem, you should either add the WHERE section using one operator, or remove all brackets, or call SetOrderBy after adding the WHERE section completely.