Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ORDER BY problem
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. Please send replies to me via e-mail. For some reason, my news carrier does not have this newsgroup (comp.databases.oracle), thus I cannot read the messages in this group.
Richard K Cheng
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Mon May 19 1997 - 00:00:00 CDT