F
fsmchinese
Unregistered / Unconfirmed
GUEST, unregistred user!
下面的存储过程
Create proc Test
@Company varchar(50)
as
Declare @SQL varchar(1000)
Set @SQL = 'Select * from Service where (Company like '''+@Company+''')'
Exec(@SQL)
我在SQL Server Query Analyzer中用 Test '广州%' 可以查到所需结果,但在Delphi中
我用ADO做中介服务器,在客户端用下面的语句
ClientDataSet1.Close;
ClientDataSet1.Params.ParamByName('@Company').Value := Edit1.Text;
ClientDataSet1.Open;
却什么也查不到!!!
注: Edit1.Text =“广州%” (没有引号)
Create proc Test
@Company varchar(50)
as
Declare @SQL varchar(1000)
Set @SQL = 'Select * from Service where (Company like '''+@Company+''')'
Exec(@SQL)
我在SQL Server Query Analyzer中用 Test '广州%' 可以查到所需结果,但在Delphi中
我用ADO做中介服务器,在客户端用下面的语句
ClientDataSet1.Close;
ClientDataSet1.Params.ParamByName('@Company').Value := Edit1.Text;
ClientDataSet1.Open;
却什么也查不到!!!
注: Edit1.Text =“广州%” (没有引号)