Board index » delphi » Assign NULL value to TParam (TIBStoredProc IBX4.52) in Delphi

Assign NULL value to TParam (TIBStoredProc IBX4.52) in Delphi

I need to assign NULL value for a StoredProc parameter .

Sp.Params.CreateParam(ftInteger, ''f_name', ptInput);
 or
Sp.Params.CreateParam(ftVariant,'f_name', ptInput);
{assignation}
Sp.{Params.}ParamByName('f_name').Value = NULL;

This leads to error.

Thank You for Any help.

Andrey

 

Re:Assign NULL value to TParam (TIBStoredProc IBX4.52) in Delphi


Delphi Help for TParam:

Sets the Value of the parameter to NULL.

procedure Clear;

Description

Use Clear to assign a NULL value to a parameter. Calling Clear neither sets
nor clears the Bound property. When assigning a NULL value to a parameter,
set the Bound property as well as calling Clear.

--
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

Quote
"???? ???" <nikov...@inbox.ru> wrote in message

news:3b7047f2_2@dnews...
Quote
> I need to assign NULL value for a StoredProc parameter .

> Sp.Params.CreateParam(ftInteger, ''f_name', ptInput);
>  or
> Sp.Params.CreateParam(ftVariant,'f_name', ptInput);
> {assignation}
> Sp.{Params.}ParamByName('f_name').Value = NULL;

> This leads to error.

> Thank You for Any help.

> Andrey

Re:Assign NULL value to TParam (TIBStoredProc IBX4.52) in Delphi


When I need to send a null value through my stored procedures parameters I
use the same syntax you reported. I just have error messages when the data
field in my table definition doesn't allow null values.

Rgds.
Reginaldo Francisco
Ctd Informtica Ltda. - Brasil
c...@digi.com.br

???? ??? <nikov...@inbox.ru> escreveu nas notcias de
mensagem:3b7047f2_2@dnews...

Quote
> I need to assign NULL value for a StoredProc parameter .

> Sp.Params.CreateParam(ftInteger, ''f_name', ptInput);
>  or
> Sp.Params.CreateParam(ftVariant,'f_name', ptInput);
> {assignation}
> Sp.{Params.}ParamByName('f_name').Value = NULL;

> This leads to error.

> Thank You for Any help.

> Andrey

Re:Assign NULL value to TParam (TIBStoredProc IBX4.52) in Delphi


Call Clear on the TParam.

Quote
"???? ???" wrote:

> I need to assign NULL value for a StoredProc parameter .

> Sp.Params.CreateParam(ftInteger, ''f_name', ptInput);
>  or
> Sp.Params.CreateParam(ftVariant,'f_name', ptInput);
> {assignation}
> Sp.{Params.}ParamByName('f_name').Value = NULL;

> This leads to error.

> Thank You for Any help.

> Andrey

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads