Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » Problem with rowid and URL using plsql
Problem with rowid and URL using plsql [message #121171] Thu, 26 May 2005 11:10 Go to next message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
Some people in my class at college have a problem with rowid returning values with a '+' in there. When use the rowid as part of a url, it puts a space in, and the url won't load. We have established the escape code to stop this happening, but would like to use a supplied function to auto-format the url for us. Does something like this exist in either the owa_utils package or somewhere else?
thx
adam
Re: Problem with rowid and URL using plsql [message #121216 is a reply to message #121171] Thu, 26 May 2005 23:27 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Try using UTL_URL.ESCAPE and UTL_URL.UNESCAPE.

The UTL_URL package is documented in the Supplied PL/SQL Packages and Types Reference Guide.

Best regards.

Frank
Re: Problem with rowid and URL using plsql [message #121292 is a reply to message #121216] Fri, 27 May 2005 08:11 Go to previous messageGo to next message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
Thanks, I found the pl/sql guide on the net and found the description of the function. Only thing i'm not sure about is what to pass in as the charset... is there some default i can pull from somewhere and pass in, or is there an overloaded function that doesn't need the charset?
thx
adam
Re: Problem with rowid and URL using plsql [message #121389 is a reply to message #121292] Sat, 28 May 2005 02:09 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

You do not need to specify the character set:

"If url_charset is NULL, the database charset is assumed and no character set conversion will occur. The default value is the current default body character set of the UTL_HTTP package, whose default value is ISO-8859-1. The character set can be named in Internet Assigned Numbers Authority (IANA) or Oracle naming convention."

Example:
SQL> SELECT utl_url.escape('http://orafaq.com/?param1=value with spaces')
  2    FROM dual;

UTL_URL.ESCAPE('HTTP://ORAFAQ.COM/?PARAM1=VALUEWITHSPACES')
--------------------------------------------------------------------------------
http://orafaq.com/?param1=value%20with%20spaces


Best regards.

Frank
Re: Problem with rowid and URL using plsql [message #121397 is a reply to message #121389] Sat, 28 May 2005 05:21 Go to previous message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
thank you very much, you're help has been invaluable. There's going to be half a class of very grateful people on tuesday
cheers
adam
Previous Topic: Ip addresses and TCP
Next Topic: Error in Database connection
Goto Forum:
  


Current Time: Fri Apr 19 12:49:16 CDT 2024