Discussion:
Null AnsiString Parametre in IBStoredProc
(too old to reply)
Giò
2005-10-04 16:57:29 UTC
Permalink
Hi,
I have these statements:

AnsiString Name;
....
IBStoredProc->StoredProcName = "MyProc";
IBStoredProc->Prepare();
IBStoredProc->ParamByName("ROOM")->AsString = Name
IBStoredProc->ExecProc();

When Name is a null String I would like the field to be NULL.
There is a way to di this without modify oricedure inside Dartabase?
Jeff Overcash (TeamB)
2005-10-04 18:36:49 UTC
Permalink
Post by Giò
Hi,
AnsiString Name;
....
IBStoredProc->StoredProcName = "MyProc";
IBStoredProc->Prepare();
IBStoredProc->ParamByName("ROOM")->AsString = Name
IBStoredProc->ExecProc();
When Name is a null String I would like the field to be NULL.
There is a way to di this without modify oricedure inside Dartabase?
There is no such thing as a NULL string. There is the empty string, but NULL is
the absence of any value, the empty string is a string of length 0. They are
totally different things. You need to call Clear on the parameter and the set
bound = true. Look at the TParam.Clear online help.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Your friends will know you better in the first minute you meet than your
acquaintances will know you in a thousand years. (R Bach)
Loading...