Subject | Re: [IBO] Field value |
---|---|
Author | callgas2001 |
Post date | 2003-10-16T23:08:26Z |
if is a bug of ibo, i dont know
the sampel code his hier
//DestinationTable: TIBOTable;
//Database1: TIBODatabase;
//SourceTable: TIBOTable;
SourceTable.active:=true;
SourceTable.first;
SourceTable.edit;
SourceTablePHONE_NO.asvariant:=null; // set null to colunm phone_NO
for test
SourceTable.Post;
// add record from sourcetable into destinationtable with field
phonenumber = null
destinationtable.insert;
DestinationTableDEPT_NO.value :='950';
DestinationTableDEPARTMENT.value :='Customer Support 1';
DestinationTableHEAD_DEPT.AsVariant:=NULL;
DestinationTableMNGR_NO.value :=SourceTableMNGR_NO.value;
DestinationTableBUDGET.value :=SourceTableBUDGET.value;
DestinationTableLOCATION.value :=SourceTableLOCATION.value;
// use de property .text for demonstrate the problem
DestinationTablePHONE_NO.Text :=SourceTablePHONE_NO.Text;
destinationtable.Post;
if DestinationTablePHONE_NO.isnull then
showmessage('hello world')
else
showmessage('wrong?');
// after this while, see column Phone_NO in iboconsole, the value
is '' (empty string) but this correct is Null
// (or <null> in a data grid of iboconsole
the sampel code his hier
//DestinationTable: TIBOTable;
//Database1: TIBODatabase;
//SourceTable: TIBOTable;
SourceTable.active:=true;
SourceTable.first;
SourceTable.edit;
SourceTablePHONE_NO.asvariant:=null; // set null to colunm phone_NO
for test
SourceTable.Post;
// add record from sourcetable into destinationtable with field
phonenumber = null
destinationtable.insert;
DestinationTableDEPT_NO.value :='950';
DestinationTableDEPARTMENT.value :='Customer Support 1';
DestinationTableHEAD_DEPT.AsVariant:=NULL;
DestinationTableMNGR_NO.value :=SourceTableMNGR_NO.value;
DestinationTableBUDGET.value :=SourceTableBUDGET.value;
DestinationTableLOCATION.value :=SourceTableLOCATION.value;
// use de property .text for demonstrate the problem
DestinationTablePHONE_NO.Text :=SourceTablePHONE_NO.Text;
destinationtable.Post;
if DestinationTablePHONE_NO.isnull then
showmessage('hello world')
else
showmessage('wrong?');
// after this while, see column Phone_NO in iboconsole, the value
is '' (empty string) but this correct is Null
// (or <null> in a data grid of iboconsole