Home » Developer & Programmer » Forms » Custon record field type declaration with %type option (10g , Forms6i, Win XP)
Custon record field type declaration with %type option [message #302496] Mon, 25 February 2008 23:27 Go to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hello again,

I have a question here regarding custom record type declaration. Forms 6i would not let me declare a field in my custom record of same type as that in a table with the '%type' syntax though I have already seen this on another forum.
Note:
1] My Form6i is effectively connected to the right database at that time.
2] Both the table and specified field exist there.
3] I'm sober when I code Razz

so my code chunk looks like this :

type tuple is record(totalETCA number,PERI ETCA.PERI%type,...);

(where ETCA is the table name and PERI is a field in there.)

Upon compilation, Forms tells me this:

"Error 320" - "The declaration of the type of this expression is incomplete or malformed."

Please advise. I know that I can substitute simple types for these fields (which I do right now)but it's a better practice to keep this level of abstraction; and besides I don't see any reason why it won't work since Forms let me set simple types in this way (myVar ETCA.PERI%type - compiles ok).

regards,
Didier
Re: Custon record field type declaration with %type option [message #302734 is a reply to message #302496] Tue, 26 February 2008 19:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Because your complex type is not a simple type. Check the version of Forms to which the 'other forum' refers. Forms 6i uses a different level of PL/SQL when compared to Forms 9i or higher and also Oracle Database 9i and higher. That is, PL/SQL V1 versus V2 and then PL/SQL 10g/11g.

The documentation says something like 'only date, character, and number' are supported. I even think Forms 6i has problems with 'boolean' as an argument type.

David
Re: Custon record field type declaration with %type option [message #302799 is a reply to message #302734] Wed, 27 February 2008 01:08 Go to previous message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hi again,

Thanks for the tip. If things are so, i'll just stick to the work-around and keep the form in this way.

cheers,
Didier
Previous Topic: Print Form
Next Topic: update
Goto Forum:
  


Current Time: Thu Dec 08 16:32:40 CST 2016

Total time taken to generate the page: 0.08182 seconds