Subject | Re: [ib-support] setNull doesn't work |
---|---|
Author | Lucas Franzen |
Post date | 2002-07-30T09:34:58Z |
Claudio,
But if you do inserts or updates with SQL statements the Param.Clear
method will set the Param to NULL thus setting the inserted/updated
field to NULL.
INSERT INTO MYTABLE ( MY_ID, MY_NAME, MY_OTHERFIELD )
VALUES ( :ID, :MYNAME, :MYOTHERFIELD );
if you do ParamByName ( 'MYOTHERFIELD' ).Clear and execute the statement
the field will contain NULL afterwards.
Luc.
> The setNull isn't useful and if i have the possibility to have null valueIt is useful, but maybe NOT in a select statement.
> the PreparedStatement isn't useful too.
But if you do inserts or updates with SQL statements the Param.Clear
method will set the Param to NULL thus setting the inserted/updated
field to NULL.
INSERT INTO MYTABLE ( MY_ID, MY_NAME, MY_OTHERFIELD )
VALUES ( :ID, :MYNAME, :MYOTHERFIELD );
if you do ParamByName ( 'MYOTHERFIELD' ).Clear and execute the statement
the field will contain NULL afterwards.
Luc.