Tuesday 15 November 2011

ADF 11.1.2.1.0 : No row found for rowKey

If you get the following error on a View Object with a key of data type, Number:
<FacesCtrlHierBinding$FacesModel><makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[89898989898]]
Then, check the Access Mode of the View Object under General settings; the Tuning section. The Access Mode is set to Scrollable by default, but for some reason it was set to Range Paging in my case. Changing it back to Scrollable solved it for me!

Tuesday 8 November 2011

Toad for Oracle and literals containing the ampersand character

The best way to construct a valid varchar literal that won't be rejected by the script execution in Toad for Oracle is to do something like this:
'john'||chr(38)||'sally'
The fact that the chr() function returns the ampersand as execution result makes it less problematic.

The above solution works well when you have to deal with the ampersand character within a stored procedure or forms script where you can assign the value to a declared variable.

However, when it comes to a normal update statement the following works much better:
update my_table set url='/faces/myservlet?paramOne=valueOne' || '&' || 'paramTwo=valueTwo' where id='myId'

When the ampersand stands alone in a literal value it seems to get bypassed as special character!!

Hope you find it handy ampersandy!

Friday 4 November 2011

Toad for Oracle 9.7.2.5 : Can't initialize OCI. Error -1

IF you are running Toad for Oracle on Windows 7 and you're getting the error: "Can't initialize OCI. Error -1", when you're trying to initiate a connection, THEN go to the "Properties" of the Toad shortcut in the Start Menu and in the Compatibility Tab tick the check box next to the text: "Run this program as an administrator." When you run Toad again you would be able to open connections!! 

PS: Also make sure your ORACLE_HOME environment variable is set to the correct location. Could be a show stopper in your case like in mine. :-)