Webdb:Trying to write own 'LINK' function...need help

From: Kelly <kgrigg_at_diamonddata.com>
Date: 2000/07/12
Message-ID: <8kihl3$1bm$1_at_nnrp1.deja.com>#1/1


Hi all,
I've seen some Webdb related stuff here before..so, hoping I might get some help. I've run into the problem of reports generated via a query instead of the wizard....it does NOT give you the option to associate a link with a column.

I have found that the LINK...is actually nothing more than an html <A HREF= anchor pointing you to say a forms .show. I had heard some people had just created their own package and functions to create such a link...and I'm trying to come up with the same. If someone has an example of this please send....

In lieu of an example...maybe I could get some answers on how Webdb is trying to parse my SQL statement...It must be adding quotes or something to it and crashing.

I was just trying to take 'baby steps first'...I'm a bit new to PL?SQL functions and procedure...ran into a problem with something called pragma...but, I found some examples and got it working (but, I have NO idea what it is all about).

Here is my package and procedure:

PACKAGE new_link AS

        FUNCTION genlink (link_object VARCHAR2,link_rowid VARCHAR2)RETURN VARCHAR2;
        PRAGMA RESTRICT_REFERENCES (genlink, RNDS,WNDS,RNPS,WNPS); END new_link;

FUNCTION genlink (link_object VARCHAR2,link_rowid VARCHAR2) RETURN VARCHAR2 IS         new_string VARCHAR2 (2000);

	BEGIN
		new_string := '<A
HREF='||'"'||'http://www.oracle.com'||'"'||'>Click Here</A>';
		RETURN (new_string);
		PRAGMA RESTRICT_REFERENCES (genlink,

RNDS,WNDS,RNPS,WNPS);         END genlink;

END new_link;

Basically, it receives two parameters...but, I don't do anything with them yet. I'm returning nothing more than a link to oracle's website.

I run this with:
SQL> SELECT LI_TRACKER.NEW_LINK.GENLINK('X','Y') FROM DUAL; in SQL*Plus...and it runs just fine. It returns:

<A HREF="http://www.oracle.com">Click Here</A>

However, if I try, in WebDB's report writer if I try to do the same query...I get the following 'parse' errors.

WWV-13010 Unable to describe SQL statement. Please correct it WWV_UTLBUILD.PARSE_INTERNAL_QUERY ORA-06502: PL/SQL: numeric or value error WWV_UTLBUILD.PARSE_INTERNAL_QUERY WWV-13005Invalid SQL statement: SELECT
LI_TRACKER.NEW_LINK.GENLINK('X','Y')
FROM DUAL
WWV_UTLBUILD.PARSE_INTERNAL_QUERY ORA-06502: PL/SQL: numeric or value error WWV_UTLBUILD.PARSE_INTERNAL_QUERY I went into look at the packages webdb has created for a report that used the wizard, and had a link in it...and it appears to create a query string...and does some stuff to it...but, I'm not sure what...

So...any ideas, suggestions or examples out there?

TIA!! Kelly
kgrigg_at_diamonddata.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jul 12 2000 - 00:00:00 CEST

Original text of this message