Subject RE: [firebird-support] BLOBs and Triggers
Author Alan McDonald
It works for a test for me but I am fully qualifying the insert. Please try
it again in IBExpert first by trying

>>insert into releases (ReleaseID, FileID, releaseout, relaseouttime,
releaseintime, taskid, developerid, releasenum,
>> releaseAge, releaseCrc, releaseDescription, releaseSource)
>>select
>> :newReleaseID, :newFileID, 0, null, current_timestamp, null, null, 1,
>> releases.releaseAge, releases.releaseCrc, releases.releaseDescription,
releases.releaseSource
>>from
>> releases
>>where
>> releases.releaseID = :releaseID;

check me but you get my drift

Alan

> -----Original Message-----
> From: Marcos Vinicius Dufloth [mailto:marvin@...]
> Sent: Saturday, 5 July 2003 12:33 AM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] BLOBs and Triggers
>
>
> Yep, same error if I try make an manual insert like this on IBExpert.
> There's no truncation and I insert in this table using Delphi without
> problems. The problem is that I would copy files and releases to a new
> rows, under a new version number (if you don't realize, this is an VCS
> system). I can make this on Delphi, but it will increase network traffic
> without needed. Just I wonder if I can do it on server side...
>
> Marcos.
>
>
> Alan McDonald wrote:
>
> >And you are sure it's not a truncation somewhere else in the trigger?
> >My gut does not like the not null blob fields - never done that
> and probably
> >never would but maybe it's OK
> >Can you (have you tried to) make a manual insertion with this
> statement not
> >in the context of the trigger?
> >Alan
> >
> >
> >
> >>-----Original Message-----
> >>From: Marcos Vinicius Dufloth [mailto:marvin@...]
> >>Sent: Saturday, 5 July 2003 12:03 AM
> >>To: firebird-support@yahoogroups.com
> >>Subject: Re: [firebird-support] BLOBs and Triggers
> >>
> >>
> >>Ooops, here the domains:
> >>
> >>create domain objectID integer;
> >>create domain boolean smallint default 0 check(value = 0 or value = 1);
> >>create domain text blob sub_type 1;
> >>create domain binary blob sub_type 0;
> >>
> >>The select is made inside a trigger, and the parameters are local
> >>variables that are initialized before this select.
> >>
> >>Marcos.
> >>
> >>
> >>Alan McDonald wrote:
> >>
> >>
> >>
> >>>>Alan, it's blob to blob. The table is the same. I getting from one row
> >>>>and inserting in another row (modifying pk, of course). And I forgot
> >>>>I'm using FB 1.5 RC3.
> >>>>Below the table and the insert statement:
> >>>>
> >>>>create table releases (
> >>>> releaseID objectID not null,
> >>>> fileID objectID not null,
> >>>> releaseOut boolean not null,
> >>>> releaseOutTime timestamp,
> >>>> releaseInTime timestamp,
> >>>> taskID objectID,
> >>>> developerID objectID,
> >>>> releaseNum smallint default 1 not null check
> (releaseNum
> >>>>
> >>>>
> >>>>>0),
> >>>>>
> >>>>>
> >>>> releaseAge timestamp not null,
> >>>> releaseCrc integer,
> >>>> releaseDescription text not null,
> >>>> releaseSource binary not null,
> >>>> constraint releasesPK primary key (releaseID)
> >>>>);
> >>>>
> >>>>...
> >>>>insert into releases
> >>>>select
> >>>> :newReleaseID, :newFileID, 0, null, current_timestamp, null, null, 1,
> >>>> releaseAge, releaseCrc, releaseDescription, releaseSource
> >>>>from
> >>>> releases
> >>>>where
> >>>> releaseID = :releaseID;
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>What's the domain text? How is it defined? and binary?
> >>>Why are you using parameters in the select? Is this how you are
> >>>
> >>>
> >>running the
> >>
> >>
> >>>query in an admin tool or in your application?
> >>>
> >>>Alan
> >>>
> >>>
> >>>
> >>>
> >>>To unsubscribe from this group, send an email to:
> >>>firebird-support-unsubscribe@yahoogroups.com
> >>>
> >>>
> >>>
> >>>Your use of Yahoo! Groups is subject to
> >>>
> >>>
> >http://docs.yahoo.com/info/terms/
> >
> >
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >To unsubscribe from this group, send an email to:
> >firebird-support-unsubscribe@yahoogroups.com
> >
> >
> >
> >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> >
> >To unsubscribe from this group, send an email to:
> >firebird-support-unsubscribe@yahoogroups.com
> >
> >
> >
> >Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> >
> >
>
> --
>
> *__________________________________________________________________*
> *Marcos Vinicius Dufloth*
> *ICQ#: 128291190
>
> Tecnocyber, Ltda
> Erechim - RS - Brasil
> *
>
> *+* *Outras formas de contato * <http://wwp.icq.com/128291190>
> *__________________________________________________________________*
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>