Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ORDER BY problem

ORDER BY problem

From: Richard K Cheng <rich_at_erols.com>
Date: 1997/05/19
Message-ID: <864063411.24955@dejanews.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. 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 Usenet
Received on Mon May 19 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US