Hallo,
thank's, the problem with the sequences in ORACLE is fixed.
Here is a sample of a trigger:
CREATE OR REPLACE TRIGGER visitor_ins
BEFORE INSERT
ON visitor
FOR EACH ROW
DECLARE
BEGIN
--
-- MODIFICATION HISTORY
-- Person Date Vers. Comments
-- ------ ---------- -----
-----------------------------------------------
-- AH 08/11/2000 1.00 Trigger created.
-- [EMAIL PROTECTED]
--
IF :NEW.visitorid IS NULL THEN
SELECT visitor_sequence.nextVal() INTO :NEW.visitorid FROM dual;
END IF;
END;
It uses the sequence definitions in oratable_schema coming with Jyve
distribution.
Andreas
> I commited the first request. It works for both mysql and postgres (
> both mysql and postgres works without the explicit FROM clause).
> I'll look at the second one.
> I don't know about sequences in oracle. There must be one though.
> mike
> On Wed, Nov 08, 2000 at 03:02:39PM +0000, Andreas H�rtel wrote:
> > Hi,
> >
> > I'm a newbie with Jyve. These exceptions occours when I'm using Jyve on
> > an ORACLE database 8.1.6. Are these known bugs?
> > I've made a little bug fixes.
> >
> > But, I've another question. Has everyone a solution for the sequences in
> > ORACLE? There is an advice in the archive about a trigger...
> > I don't know what to do.
> >
> > Andreas
> >
> > -----------------------------------------------------------------------
> >
> > java.sql.SQLException: ORA-00923
> >
> > org.apache.jyve.screens.DisplayTopics.getAnswerCount(DisplayTopics.java:
> > 385)
> >
> > sql.append(" SELECT answer.question_id ");
> > // this line was missing
> >
> > sql.append(" FROM answer ");
> > //
> > sql.append(" WHERE answer.question_id = question.question_id
> > ");
> >
> >
> > java.sql.SQLException: ORA-00911
> >
> > org.apache.jyve.util.RecordExtractor.getConfirmValue(RecordExtractor.jav
> > a:207)
> >
> > sql.append ( "SELECT CONFIRM_VALUE FROM Visitor WHERE LOGINID='"
> > );
> > sql.append ( username );
> > // sql.append ( "';" );
> > sql.append ( "'" );
> >
> > -----------------------------------------------------------------------
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Archives and Other: <http://java.apache.org/main/mail.html>
> > Problems?: [EMAIL PROTECTED]
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/main/mail.html>
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]