Page 1 of 1
how to assign param value to null
Posted: Mon 25 May 2009 01:08
by lk
i want to know how to assign param value to null
can do as this:
SQLQuery2.Params.ParamByName('factory_name').AsString := '';
Posted: Mon 25 May 2009 06:57
by Plash
The recommended way is the following:
Code: Select all
SQLQuery2.Params.ParamByName('factory_name').Value := Null;
Posted: Thu 04 Jun 2009 05:20
by lk
Plash wrote:The recommended way is the following:
Code: Select all
SQLQuery2.Params.ParamByName('factory_name').Value := Null;
hi Plash,
I hvae try this way, use DevartOracle mode it's work fine,
but in DevartOracleDirect mode it's have problem
in DevartOracleDirect mode
SQLQuery2.Active := False;
SQLQuery2.Params.ParamByName('dname').Value := null;
SQLQuery2.Params.ParamByName('DEPTNO').AsInteger := 10;
SQLQuery2.ExecSQL();
showMessage(inttostr(SQLQuery2.RowsAffected));
the result RowsAffected = 0 and in database the data not changed,
SQLQuery.sql:
update dept
set dname = :dname
where DEPTNO = :DEPTNO
table dept oracle demo database scott/tiger
Posted: Fri 05 Jun 2009 09:14
by Plash
We could not reproduce the problem. Please send to dbxoda*devart*com a complete small sample that demonstrates the problem.