Link to home
Start Free TrialLog in
Avatar of globalwm
globalwm

asked on

ORA-01410: Invalid ROWID

This URL is giving me a invalid ROWID error:

http://oracle/btc_edit.asp?Rowid=AAAAyyAAMAAAG+WAAH

when I issue the same cmd in SQL*Plus, I get:

SQL> select * from man_prod.batch_time_cards where Rowid=AAAAyyAAMAAAG+WAAH;
select * from man_prod.batch_time_cards where Rowid=AAAAyyAAMAAAG+WAAH
                                                                                                              *
ERROR at line 1:
ORA-00904: invalid column name


Is the "+" sign messing things up? This has all worked before when it was just all chars.

Do I need to process the ROWID further with a function/package?

Avatar of globalwm
globalwm

ASKER

Q_21066828  seems to help.  Nevermind.
Well, in SQL*Plus, the above worked, but in ASP, it's not helping. Here is my query code:

<%
'get rowid for record edit
rowid = request.querystring("rowid")
if rowid="" or isnull(rowid) then
      rowid=request.form("rowid")
end if

Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oraPROD_STRING
Recordset1.Source = "SELECT ROWID, JOB_NUMBER, LABOUR_CLASS, START_TIME, END_TIME, LABOUR_RATE, RUNTIME_REGULAR, LABOUR_UNITS, OUTPUT_QTY  FROM MAN_PROD.BATCH_TIME_CARDS  WHERE ROWID=CHARTOROWID('" & rowid & "')"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>

The SQL works fine using:

SELECT ROWID, JOB_NUMBER, LABOUR_CLASS, START_TIME, END_TIME, LABOUR_RATE, RUNTIME_REGULAR, LABOUR_UNITS, OUTPUT_QTY  FROM MAN_PROD.BATCH_TIME_CARDS  WHERE ROWID=CHARTOROWID('&rowid')

SQL> /
Enter value for rowid: AAAAyyAAMAAAG+WAAH

ROWID              JOB_NUMBER LABO STAR END_ LABOUR_RATE RUNTIME_REGULAR
------------------ ---------- ---- ---- ---- ----------- ---------------
LABOUR_UNITS OUTPUT_QTY
------------ ----------
AAAAyyAAMAAAG+WAAH 290772     CV12 2010 2020       .0001            .167
        .001          0


Another clue:

btc_edit.asp?Rowid=AAAAyyAAMAAAG+WAAD

when I display what's being passed to the query, it looks like:

SELECT ROWID, JOB_NUMBER, LABOUR_CLASS, START_TIME, END_TIME, LABOUR_RATE, RUNTIME_REGULAR, LABOUR_UNITS, OUTPUT_QTY FROM MAN_PROD.BATCH_TIME_CARDS WHERE ROWID=CHARTOROWID('AAAAyyAAMAAAG WAAD')

(note the blank space in rowid)

When I paste this into SQL*Plus, I get:

ERROR at line 1:
ORA-01410: invalid ROWID

What worked (for now) was placing this between reading my url querystring and constructing the sql statement:

rowid = replace(rowid," ","+")

The problem seems to be in request.querystring

Please check this function or post its content here
'get rowid for record edit
rowid = request.querystring("rowid")
if rowid="" or isnull(rowid) then
      rowid=request.form("rowid")
end if
'process rowid to get back special chars
rowid = replace(rowid," ","+")
ASKER CERTIFIED SOLUTION
Avatar of SMartinHamburg
SMartinHamburg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial