[comp.databases] using triggers in pc oracle forms

paterra@xanth.cs.odu.edu (Frank C. Paterra) (02/10/89)

Hello Netlanders,

I'm having a problem with sqlforms on the pc version of oracle.  Every
things seems to work ok until I use a trigger that has a #EXEMACRO
statement in it.  I've tried #exemacro exeqry, #exemacro nxtblk, and
lots of others, but whenever it gets to the #exemacro statement
I get the error "SQL error in processing post-field trigger".  I've tried
using post-field, post-change, and pre-field triggers, but the result
is the same.  

My company did not purchase the telephone support so oracle can't give
me any help.  What might I be doing wrong??

Thanks for the help
Frank Paterra
paterra@xanth.cs.odu.edu

leo@philmds.UUCP (Leo de Wit) (02/12/89)

In article <7606@xanth.cs.odu.edu> paterra@xanth.cs.odu.edu (Frank C. Paterra) writes:
|Hello Netlanders,
|
|I'm having a problem with sqlforms on the pc version of oracle.  Every
|things seems to work ok until I use a trigger that has a #EXEMACRO
|statement in it.  I've tried #exemacro exeqry, #exemacro nxtblk, and
|lots of others, but whenever it gets to the #exemacro statement
|I get the error "SQL error in processing post-field trigger".  I've tried
|using post-field, post-change, and pre-field triggers, but the result
|is the same.  

The problem is that you try to use exemacro on a non key type trigger
(I believe Oracle calls it 'synchronous trigger', or was it
asynchronous?).  With this type of trigger you can only use #exemacro
null (and some other seldom useful #exemacro's) or any userdefined
triggers that at most amount to this kind of exemacro stuff. If you use
a KEY-NXTFLD trigger instead and put the exemacro there, SQL*Forms will
be happy.

B.T.W. use the Display Error key (or whatever its name is) directly
after SQL*Forms reports an error; this might give you some indication
about the cause of the trouble.

	Leo.

ber@astbe.UUCP (H.Bernau) (02/13/89)

In article <7606@xanth.cs.odu.edu> paterra@xanth.cs.odu.edu (Frank C. Paterra) writes:
>Hello Netlanders,
>
>I'm having a problem with sqlforms on the pc version of oracle.  Every
>things seems to work ok until I use a trigger that has a #EXEMACRO
>statement in it.  I've tried #exemacro exeqry, #exemacro nxtblk, and
>lots of others, but whenever it gets to the #exemacro statement
>I get the error "SQL error in processing post-field trigger".  I've tried
>using post-field, post-change, and pre-field triggers, but the result
>is the same.  

Hello Frank,

sorry that I'm not replying via mail but our local sendmail doesn't understand
your adress.

As stated in the SQL*Forms Designer's Reference Manual you are not allowed
to use trigger steps that will cause a cursor movement in 
{pre,post}-{field,record,block,form} triggers. Look at the manual to see what
kind of trigger steps are allowed.

Hope this will help you

Rolf

-------------------------------------------------------------------------------
|   Rolf Bernau               |
|   GEI Software Technik mbH  |  Berlin:             astbe!ber
|   Hohenzollerndamm 150      |  USA:                ...!pyramid!tub!astbe!ber
|   1000 Berlin 33            |
|   West-Germany              |
-------------------------------------------------------------------------------

crand@cetc.Wichita.NCR.COM (Collette Rand) (02/13/89)

In article <7606@xanth.cs.odu.edu> paterra@xanth.cs.odu.edu (Frank C. Paterra) writes:
>Hello Netlanders,
>
>I'm having a problem with sqlforms on the pc version of oracle.  Every
>things seems to work ok until I use a trigger that has a #EXEMACRO
>statement in it.  I've tried #exemacro exeqry, #exemacro nxtblk, and
>lots of others, but whenever it gets to the #exemacro statement
>I get the error "SQL error in processing post-field trigger".  I've tried
>using post-field, post-change, and pre-field triggers, but the result
>is the same.  
>
>My company did not purchase the telephone support so oracle can't give
>me any help.  What might I be doing wrong??
>
>Thanks for the help
>Frank Paterra
>paterra@xanth.cs.odu.edu


Frank, 

As far as I understand it, #EXEMACRO statements can only be used 
to redefine keys, except for macros that take arguments.

The only macro function codes that take arguments are:
 CALL, CALLQRY, CASE, EXETRG, and NULL.
 (GOBLK and GOFLD take arguments but are not included in this
  group.)

I got this information out the the SQL*Forms Class Notes.
I hope this helps you.

-- 
Collette Rand      |  NCR: 530-4741   (316) 636-4741 C.Rand@Wichita.NCR.COM
NCR - CETC         |  <{ece-csc,hubcap,gould,rtech}!ncrae!ncrwic!crand
3450 N. Rock Rd.   |  <{sdcsvax,cbatt,dcdwest,nosc.ARPA,ihnp4}!ncr-sd!
Wichita, KS  67226 |              ncrwic!crand