Subject RE: [IBO] Strange Data in my inserts
Author Colin Fraser
Hi Geoff (and others),

I have attached the IB Monitor output and table definition as requested...
(I have also included the original question and reply... it is only 4K which
is smaller than the original message, so hope that is ok with everyone:-) )

I also have a query about your reply...

>> Server defaults are only used if the field is not explicitly provided
>> in an insert statement. eg.
>> create tablea(
>> fielda varchar(20) default 'a',
>> fieldb varchar(20) default 'b'
>> );

>> insert into tablea (fielda) values ('c');
>> will result with fieldb set to its default. Whereas...

>> insert into tablea (fielda,fieldb) values( 'c', null );
>> will result with fieldb set to NULL!!!

Also from your reply doing a select * will insert all fields and set the non
specified fields to Null... so what happens if the table definition defines
Not Null for some fields? I was assuming that the table defaults would
spring into action... when I have defaults on a field, no error is raised
about trying to insert a null into a not null field when posting or
committing so I assumed this is what was happening.

Anyway, Attached is the output and table structure.

Note that the IB Monitor output contains output for 2 almost identical
tables. The only difference with the cursor properties is that the second
one has PreparedEdits set to True, this showed the actual data in IB Monitor
that was ending up in the DB.

Am using Delphi 5 and downloaded the latest partial source version of IBO
the other day before posting to see if that made a difference... it didn't.

Regards
Colin

######################################################################
Attention:
The information in this email and in any attachments is confidential.
If you are not the intended recipient then please do not distribute,
copy or use this information. Please notify us immediately by return
email and then delete the message from your computer.
Any views or opinions presented are solely those of the author.
######################################################################


[Non-text portions of this message have been removed]