dbTalk Databases Forums  

EOF error creating trigger?

comp.databases.btrieve comp.databases.btrieve


Discuss EOF error creating trigger? in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill
 
Posts: n/a

Default EOF error creating trigger? - 02-08-2007 , 03:35 PM






I am trying to create the following trigger.

CREATE TRIGGER paRelateLinkInsert
AFTER INSERT ON paRelate
FOR EACH ROW
BEGIN
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
END

When I run this in PCC I get the error, "6: '': Syntax error".

After some additional experimentation I have discovered that I get the
same error if I remove the second INSERT. However, if I then remove the
BEGIN and END the trigger is created. So the cause of the error is the
way I am using the BEGIN and END.

What am I doing wrong?

--
..Bill.

Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-08-2007 , 09:15 PM






I had no problem running this is the PCC with Pervasive.SQL V8.7
(Changing paRelate to Person so it would work on DEMODATA):

CREATE TRIGGER paRelateLinkInsert
AFTER INSERT ON Person
FOR EACH ROW
BEGIN
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
END
SQL statement(script) has executed successfully.
0 row(s) were affected.


Which engine/PCC version are you running?
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 03/2007 ***

Bill wrote:

Quote:
I am trying to create the following trigger.

CREATE TRIGGER paRelateLinkInsert
AFTER INSERT ON paRelate
FOR EACH ROW
BEGIN
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
END

When I run this in PCC I get the error, "6: '': Syntax error".

After some additional experimentation I have discovered that I get the
same error if I remove the second INSERT. However, if I then remove
the BEGIN and END the trigger is created. So the cause of the error
is the way I am using the BEGIN and END.

What am I doing wrong?


Reply With Quote
  #3  
Old   
Bill
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-09-2007 , 09:53 AM



Bill Bach wrote:

Quote:
I had no problem running this is the PCC with Pervasive.SQL V8.7
(Changing paRelate to Person so it would work on DEMODATA):
I am using 9.5. I wonder if this is a problem introduced in 9.5.

--
..Bill.


Reply With Quote
  #4  
Old   
Bill
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-09-2007 , 10:06 AM



Bill Bach wrote:

Quote:
CREATE TRIGGER paRelateLinkInsert
AFTER INSERT ON Person
FOR EACH ROW
BEGIN
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR)
VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId,
NEW.FromRR);
END
I just tried this against DemoData in PCC 9.5 and I get the same EOF
error so this is a new "feature".

--
..Bill.


Reply With Quote
  #5  
Old   
Bill
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-09-2007 , 12:35 PM



I just got confirmation that this is a bug in PCC 9.5.

--
..Bill.

Reply With Quote
  #6  
Old   
Bill Bach
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-11-2007 , 12:51 PM



Any word on a fix date? If you can post the bug number, that'll help,
too.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 03/2007 ***

Bill wrote:

Quote:
I just got confirmation that this is a bug in PCC 9.5.


Reply With Quote
  #7  
Old   
wfreeman@analyticabiz.com
 
Posts: n/a

Default Re: EOF error creating trigger? - 02-21-2007 , 06:37 PM



On Feb 9, 10:35 am, "Bill" <n... (AT) no (DOT) com> wrote:
Quote:
I just got confirmation that this is a bug in PCC 9.5.

--
.Bill.
I did a little further experimentation, and found that, while it is a
bug in PCC 9.5, which sort of implies it's a bug in Pervasive's JDBC,
it is also a bug in their ODBC, but NOT in the Pervasive OLE DB
Provider.

I verified this with both a little free utility called "Foxy SQL Free"
and one of my own utilities. When I connected to DEMODATA through
ODBC and ran Bill Bach's version of the trigger create query, it
failed with a syntax error. When I connected through the Pervasive
OLE DB Provider, it did not fail, and created the trigger.

Wayne Freeman
Analytica Business Systems
http://www.analyticabiz.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.