Article View: borland.public.interbase.sql
Article #236Re: debug stored procedures
From: Martijn Tonies
Date: Mon, 16 Jun 2008 06:58
Date: Mon, 16 Jun 2008 06:58
37 lines
2592 bytes
2592 bytes
> OK but I encounter today a very strange scenario: > first after I modified my stored procedure I run Delphi to see what will > go, I set before 3 triggers (after insert, after update and after > delete) for "table a" which they all call one procedure with different > parameters > > then when I try to post an inserted record I get exception error that I > try to post a null value to a none null field The big surprise is that > field is not in "table a" I insert the record into but in another table > "table b" which I only touch it with the update statement and "table a" > has foreign keys on table "table a" > > after alot of going around my self I deactivate the trigger which call > the procedure then I tried again to insert the record and it is > inserted normally so reactivate the trigger and try again to insert the > record *without any change in the sql* the record inserted with the same > data I tried before without any error !!!!!!!!! > > can you explain that phenomena ?? Metadata caching on the server side by the IB Server process. By re-activating the trigger, you're causing that part of the cache to get flushed. IB will re-load the metadata of the trigger and procedure from the database and load the new code. -- Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com
Technical Details
Message-ID:
<48560df7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4853fd43$1@newsgroups.borland.com> <48542502$1@newsgroups.borland.com> <48542edb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,c1bdf611911e6915 X-Google-Attributes: gid114a0e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Martijn Tonies" <m.tonies@upscene.removethis.com> Newsgroups: borland.public.interbase.sql References: <4853fd43$1@newsgroups.borland.com> <48542502$1@newsgroups.borland.com> <48542edb$1@newsgroups.borland.com> Subject: Re: debug stored procedures Date: Mon, 16 Jun 2008 08:58:10 +0200 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 NNTP-Posting-Host: 212.238.159.172 Message-ID: <48560df7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1213599223 212.238.159.172 (15 Jun 2008 23:53:43 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail