English 中文(简体)
如何从德尔菲的“不胜诉”部分中通过“民族力量”的价值?
原标题:How to pass NULL value from Unidac Query component in Delphi?

When I am using StoredProc component in Delphi using ParamByname( ParamName ).Clear I m able to send NULL value.

但是,我如何在使用“金”部分时通过“民族力量”的价值?

with Query do
begin
 SQL.ADD( exec d_upd_calc +Quoted(EditCalc.Text));
end

在上述假设中,如果ed盒不成空白,我就希望寄出联合国利比里亚特派团。

我正在使用Delphi 2010, Unidac与Sybase。

最佳回答

Even in Queries you can work with parameters:

Query.SQL.Text :=  exec d_upd_calc :myparam ;
Query.Prepare;
Query.ParamByName( myparam ).Clear;

而使用参数比建立完整体要好,因为你不能通过卡片注射处理报价,避免安全漏洞。

问题回答

优点 DB 我将采取这样的行动:

var
  sqlText: string;

with Query do
begin
  if EditCalc.Text =    then
    sqlText :=  exec d_upd_calc NULL  else
    sqlText :=  exec d_upd_calc  +Quoted(EditCalc.Text);
  SQL.ADD(sqlText);
end;

如果关键词也是NUL,那么这项工作就应当进行。

http://www.un.org/? 如果是的话,那是好事。 否则就应该这样做。





相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签