P
pcw
Unregistered / Unconfirmed
GUEST, unregistred user!
adoquery1.Close;
adoquery1.sql.Clear;
adoquery1.sql.Add('select * from lsjfb ');
adoquery1.sql.Add('where lsjfb.ls1=:c2');
adoquery1.Parameters[1].value:=edit1.text;
adoquery1.Open;
运行出现'list index out of bounds(1)'错误.如果把其中2行:
adoquery1.sql.Add('where lsjfb.ls1=:c2');
adoquery1.Parameters[1].value:=edit1.text;
改为:
adoquery1.sql.Add('where lsjfb.ls0=:c2');
adoquery1.Parameters[0].value:=edit1.text;
运行正常.如果改为:
adoquery1.Close;
adoquery1.sql.Clear;
adoquery1.sql.Add('select * from lsjfb where lsjfb.ls1='+edit1.text+'');
adoquery1.Open;
运行出现'invalid column name'黄坚''错误.但把ls1或ls2改为ls0即正常.
另外SQL的转换函数TO_NUMBER用不,出现不支持错误.
望各位大虾指教!
adoquery1.sql.Clear;
adoquery1.sql.Add('select * from lsjfb ');
adoquery1.sql.Add('where lsjfb.ls1=:c2');
adoquery1.Parameters[1].value:=edit1.text;
adoquery1.Open;
运行出现'list index out of bounds(1)'错误.如果把其中2行:
adoquery1.sql.Add('where lsjfb.ls1=:c2');
adoquery1.Parameters[1].value:=edit1.text;
改为:
adoquery1.sql.Add('where lsjfb.ls0=:c2');
adoquery1.Parameters[0].value:=edit1.text;
运行正常.如果改为:
adoquery1.Close;
adoquery1.sql.Clear;
adoquery1.sql.Add('select * from lsjfb where lsjfb.ls1='+edit1.text+'');
adoquery1.Open;
运行出现'invalid column name'黄坚''错误.但把ls1或ls2改为ls0即正常.
另外SQL的转换函数TO_NUMBER用不,出现不支持错误.
望各位大虾指教!