ORDER BY causing problems
Date: 1997/05/19
Message-ID: <3381883f.251238041_at_news.erols.com>#1/1
Hello,
I am using an ODynaset type in Microsoft Visual C++ v4.2 connection to an Oracle database v7.3. When I enter a certain SQL statement, I cannot update the result. Bu when I take the "ORDER BY" statement out of my SQL, everything works fine.
Here is the code that does not work:
CString sSQL;
ODynaset dyn;
sSQL = "SELECT txn_id, category_id, description, txn_order FROM all_txns ORDER BY category_id, txn_order";
nRC = dyn.Open(s.m_oDataBaseConnect, sSQL); nRC = dyn.CanUpdate();
The return code from the CanUpdate is FALSE. If I try to update a record in this Dynaset, the database does not get updated. However, the exact same code works fine if I take out the "ORDER BY category_id, txn_order" statement,
Does anyone know why I can't update the statement with the ORDER BY clause.
Thanks in advance.
Richard K Cheng
- rich_at_erols.com