dbTalk Databases Forums  

Erreur while createing a trigger

comp.databases.btrieve comp.databases.btrieve


Discuss Erreur while createing a trigger in the comp.databases.btrieve forum.



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

Default Erreur while createing a trigger - 03-04-2004 , 10:43 AM






Hello all,

I am newbie with Pervasive.
Using Pervasive SQL V8

When I try to create this simple trigger
CREATE TRIGGER TR_UPDT_A
AFTER INSERT ON tblA FOR EACH ROW
UPDATE tblB SET tblB.NbrToPrint=tblB.NbrToPrint + 1 WHERE tblB.IdB=NEW.fiB;
I receive this error:
ODBC Error: SQLSTATE = S1000, Native error code = -5099
3: '<EOF>': Syntax error

I Probably do something wrong, but what ?

Thanks for any help
Guy



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

Default Re: Erreur while createing a trigger - 03-04-2004 , 04:42 PM






Try adding a BEGIN/END Block around it:
CREATE TRIGGER TR_UPDT_A
AFTER INSERT ON tblA FOR EACH ROW
BEGIN
UPDATE tblB
SET tblB.NbrToPrint = tblB.NbrToPrint + 1
WHERE tblB.IdB = NEW.fiB;
END

Might work better...
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: June, 2004: See our web site for details!


Guy wrote:

Quote:
Hello all,

I am newbie with Pervasive.
Using Pervasive SQL V8

When I try to create this simple trigger
CREATE TRIGGER TR_UPDT_A
AFTER INSERT ON tblA FOR EACH ROW
UPDATE tblB SET tblB.NbrToPrint=tblB.NbrToPrint + 1 WHERE tblB.IdB=NEW.fiB;
I receive this error:
ODBC Error: SQLSTATE = S1000, Native error code = -5099
3: '<EOF>': Syntax error

I Probably do something wrong, but what ?

Thanks for any help
Guy


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.