表 A
create table A
(
S varchar(10)
)程序 Button1, Edit1, Edit2, InterBase连接
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.Text <> '' then
begin
Edit2.Text := Edit1.Text + ' '; //Edit2 多2个空格
with IBQuery1 do
begin
Close;
SQL.Clear;
SQL.Add(' insert into a (s) values(:s)');
ParamByName('s').AsString := Edit1.Text;
ExecSQL; Close;
SQL.Clear;
SQL.Add(' select * from A where s = :s');
ParamByName('s').AsString := Edit2.Text;
Open;
if RecordCount > 0 then
ShowMessage('一样!')
else
ShowMessage('不同!');
end;
end;
end;结果是‘一样!’!...InterBase的varchar有没有空格都一样吗?怎么改呢?
create table A
(
S varchar(10)
)程序 Button1, Edit1, Edit2, InterBase连接
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.Text <> '' then
begin
Edit2.Text := Edit1.Text + ' '; //Edit2 多2个空格
with IBQuery1 do
begin
Close;
SQL.Clear;
SQL.Add(' insert into a (s) values(:s)');
ParamByName('s').AsString := Edit1.Text;
ExecSQL; Close;
SQL.Clear;
SQL.Add(' select * from A where s = :s');
ParamByName('s').AsString := Edit2.Text;
Open;
if RecordCount > 0 then
ShowMessage('一样!')
else
ShowMessage('不同!');
end;
end;
end;结果是‘一样!’!...InterBase的varchar有没有空格都一样吗?怎么改呢?
解决方案 »
- 怎样制作控件?我有两个控件想制作成dpk形式的包,怎样制作,请高手进来一叙
- Tlist可以强制转换成TParam吗?
- [讨论]邪门的问题,为什么会这样啊??!!cbc & delphi....
- 两个Borland Developer Studio 2006 的下载地址!
- 急!!!坐标系映射后,用CopyRect拷贝图像的问题?
- ******局域网内的文件传输问题******
- 需要对access数据库加密,请问高手,如何进行?
- 在DELPHI中怎样取得本机sql server 2000服务器名
- 把Web Service编译后,怎样把它分发到Web Service的虚拟目录?
- 谁有16*16的点阵字库或者转换工具或下载地址,高分求购。
- help
- 再线等待-李维:分布式多层电子商务的第一例子
例如你的数据是'aa '
你查询'aa'和 'aa '都能够查询的到的