home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,940 of 2,288   
   "Tommy DN" <"Tommy to All   
   Unhandled Exception on Oracle Form Build   
   30 Nov 04 12:13:35   
   
   XPost: comp.databases.oracle.misc, oracle.support.supportlink.reports,   
   info-oracle   
   XPost: comp.database.oracle   
   From: DN"@nospam.com   
      
   I'm working with Oracle Form Builder and I needed a trigger to check   
   something when I delete a record. I made a trigger on ' KEY-DELREC ' and   
   I've written this code ( it's just a test, the delete statement isn't   
   ready ):   
      
   ----   
   DECLARE   
   	aantal				number(8);   
   BEGIN   
   	select count(*)   
   	into aantal   
   	from voorstellingen v   
   	where :zalen.zaalnr = v.zaalnr;   
   	show_error_alert('This query has ' + aantal + ' records');   
   	raise form_trigger_failure;   
   END;   
   ----   
      
   LITTLE EXPLANATION:   
   Another table called 'voorstellingen' can have zero or more records with   
   zaalnr as foreign key ( voorstnr as primary key, but this doesn't   
   matter, I think ). When this table has one or more records, it may not   
   be deleted. ':zalen.zaalnr' is the primary key of the table 'zalen' wich   
   I'm working with.   
      
   THE PROBLEM:   
   When I perform this, the code above should give me a message about how   
   many records the table voorstellingen has. But when I perform it I   
   receive an unhandled exception: " ORA-06502: PL/SQL: numeric or value   
   error string ".   
      
   Can someone help me please ???   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca