Subject | Re: [IBO] Hello and a question |
---|---|
Author | nosix06 |
Post date | 2008-02-12T03:18:03Z |
We can't tell here whether you have an editable TIB_Query involved in
the interface, with an Insert event that kicked off the call to the
Gen_ID() function -- that would occur if you had defined
GeneratorLinks. Posting that event would have inserted a new record
with a new ID fetched by that Gen_ID() call. If you then went on,
using your button click event to grab the same value as input to your
detached INSERT statement (as you had it) then that's how you got the
key violation.
where you intended to have just one: the first record with a null
blob on it and the second one as you intended.
out the button and shift your inserting code into the BeforeInsert
event of the dataset.
gone but like you said I now have a problem with null blob fields
being created when my program starts and if I am understanding you
correctly you are saying thats because I used the INSERT statement in
the IB_DSQL component as well as calling it again when I used the
button so it will get created 2 times (first when the program loads
making the null blob filed) and then again when I call it via the
button click. If I am understandin you correctly then I understand why
you said I must do away with one or the other of them but thats where
I am lost again and don't really know where at in my code I need to
make this change and since you said you cannot see the workflow of the
program I have included a copy of it so you can look over it and see
what I am trying to accomplish and how I might be able to fix my
mistakes.
You can download a zipped version of the program and database from
here.
http://slakers.net/filehost/download.php?file=1008ab6fc9f1064986acff3278e441bf
I hope this helps both of use understand what each other is trying to
say and once again I thank you for your time and trouble I am sure
there are far better things you would like to do with your time then
waste it with newbies but it is greatly appreciated so hopefully you
will see it as time well spent.
Cheers,
Nosix
the interface, with an Insert event that kicked off the call to the
Gen_ID() function -- that would occur if you had defined
GeneratorLinks. Posting that event would have inserted a new record
with a new ID fetched by that Gen_ID() call. If you then went on,
using your button click event to grab the same value as input to your
detached INSERT statement (as you had it) then that's how you got the
key violation.
>will fix the key violation but you'll probably have two new records
> So, what I'm saying is that correcting the detached INSERT statement
where you intended to have just one: the first record with a null
blob on it and the second one as you intended.
>ib_query (in ColumnAttributes select or add THEIMAGE=NOINSERT) or take
> If I'm assuming right, then either disable inserting from the
out the button and shift your inserting code into the BeforeInsert
event of the dataset.
>Thanks again Helen for your swift reply with you help the error is
> Helen
gone but like you said I now have a problem with null blob fields
being created when my program starts and if I am understanding you
correctly you are saying thats because I used the INSERT statement in
the IB_DSQL component as well as calling it again when I used the
button so it will get created 2 times (first when the program loads
making the null blob filed) and then again when I call it via the
button click. If I am understandin you correctly then I understand why
you said I must do away with one or the other of them but thats where
I am lost again and don't really know where at in my code I need to
make this change and since you said you cannot see the workflow of the
program I have included a copy of it so you can look over it and see
what I am trying to accomplish and how I might be able to fix my
mistakes.
You can download a zipped version of the program and database from
here.
http://slakers.net/filehost/download.php?file=1008ab6fc9f1064986acff3278e441bf
I hope this helps both of use understand what each other is trying to
say and once again I thank you for your time and trouble I am sure
there are far better things you would like to do with your time then
waste it with newbies but it is greatly appreciated so hopefully you
will see it as time well spent.
Cheers,
Nosix