Home » Developer & Programmer » Forms » Can't instantiate user-defined object in a form
Can't instantiate user-defined object in a form [message #160435] Sat, 25 February 2006 15:38 Go to next message
anamaria_fratila
Messages: 21
Registered: December 2005
Location: Sibiu, Romania
Junior Member
Hello,
I'm trying to create an object inside a WHEN-NEW-FORM-INSTANCE trigger, as shown bellow:
declare
  ob <type>;	     (1)
begin
  ...	
end;

but I get the following error message at line (1) on debugging:
'implementation restriction(may be temporary)ADT or schema level collection not supported at client side with non-oci mode'.
Am I missing something ?
The type <type> appears in the object navigator.
I'm using Oracle9i Forms Builder.
Thanks for your time, Ana-Maria.
Re: Can't instantiate user-defined object in a form [message #160443 is a reply to message #160435] Sun, 26 February 2006 02:16 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I'm afraid you cannot use it as Forms has let you know. In such situations, I try to move the code to the database and call it from Forms.

MHE
Re: Can't instantiate user-defined object in a form [message #160577 is a reply to message #160435] Mon, 27 February 2006 06:33 Go to previous messageGo to next message
anamaria_fratila
Messages: 21
Registered: December 2005
Location: Sibiu, Romania
Junior Member
I've build a package in the Oracle database with procedures and functions for manipulating my objects and, as you said, Maaher, I have to call them from my form. It works fine, but still, some of my procedures have parameters of type REF <object_type>.
How can I call a procedure like that from my form and pass a REF type parameter ? Can I do that?

I tried something but didn't get the expected results:
I created the following view :
create view v as select ref(a),a* from <object_table> a;

I created a datablock in the form whose items refer to every column in the view. I tried to call a function that needs a reference parameter like this:
<func_name>(:v.oid);
But I get the compilation error:"bad bind variable 'v.oid'".

So, is there any way I can pass parameters of type object REF to stores functions and procedure from a form, or I should find another solution ?
Please help if you have any ideeas.
Thanks for your time, Ana-Maria.
Re: Can't instantiate user-defined object in a form [message #160588 is a reply to message #160435] Mon, 27 February 2006 07:29 Go to previous messageGo to next message
anamaria_fratila
Messages: 21
Registered: December 2005
Location: Sibiu, Romania
Junior Member
I also tried to set the 'Include REF Item' property of the datablock (containing the <object_table>'s columns, not the described view's columns(v)) to 'Yes', but it was in vain.
I thought a hidden item called REF would be created in the block, and I could somehow acces the object id of a row in the <object_table> through this REF item, but I can't.
I guess this property is mostly used for master-detail relations based on REF columns, and there's no way to acces the objetc ID.

Please tell me if I'm waisting my time on this matter.
Re: Can't instantiate user-defined object in a form [message #160867 is a reply to message #160588] Tue, 28 February 2006 19:26 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What version of Forms are you using?

David
Re: Can't instantiate user-defined object in a form [message #160955 is a reply to message #160435] Wed, 01 March 2006 02:49 Go to previous messageGo to next message
anamaria_fratila
Messages: 21
Registered: December 2005
Location: Sibiu, Romania
Junior Member
I'm using Forms version 10.1.2.0.2.
Re: Can't instantiate user-defined object in a form [message #161085 is a reply to message #160955] Wed, 01 March 2006 22:52 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
My apologies ... you gave the version of Forms in your initial post. Sorry ... I have neither 9i or 10g Forms available to me.

You are the first person I have come across who has designed a database with a 'type' in it. May I suggest that you review the Forms documentation and see what it says about handling 'types'.

@anyone with 9i or 10g Forms: Please create a test table with a 'type' and see if you can get Forms to access it.

David
Previous Topic: When-New-Form-Instance
Next Topic: FRM-40102 record must be entered --- error
Goto Forum:
  


Current Time: Thu Dec 26 07:44:49 CST 2024