当前位置:主页>销售管理软件> 列表

q开头的组件应该怎么改。还有个小问题 找药品进销存管理软件

记账软件版1楼: q开头的组件应该怎么改,生成的程序可以在其他机器上RUN不会报错,还有我想查询写个语句,select * from table1 where passno=''no'';no 由edt1和edt2组成,在delphi上怎么写sql语句?

2楼: 1、为什么要改?不理解
2、 Adoquery中SQL语句引号的用法,按以下:
''''''+string1+'''''' //字符型变量
''+float1+'' //数值型变量
''+field1+'' //字段常量
''''const1'''' //常量
方法教给你 如在线进销存

3楼: ''select * from table1 where passno=''''''+ Edit1.Text + Edit2.Text + '''''''';
我从不用什么参数,效率低(代码行数多,开发效率低,执行的时候,行数多,效率当然也不高),看着碍眼!

4楼: q开始的组件是clx,和linux兼容。当程序到其他机器会报错,。引用dll出错,我希望得到语句,

5楼: s_sql:=''PassNo=''''''+edtPassBeh.text + edtPassAfter.text+'''''''';
这样正确吗?我怎么还报错?

6楼: 把这段代码,完整的贴出来看看

记账软件版7楼: procedure TfrmAntibody.bbAddClick(Sender: TObject);


var S_val,S_field,S_sql:string;
begin
//choose namesort
if rdbOne.checked=true then
begin
if (edtPassBeh.Text='''')or(length(edtPassBeh.Text)<5)or (edtFormat.Text='''')or(edtLabel.Text='''')or(edtName.Text='''')or(edtNumber.Text='''')or(edtPassBeh.Text='''')or(edtPassBeh.Text='''') then
begin
application.MessageBox(''ÊäÈë¸ñʽ´íÎó!'',''ÌáʾÐÅÏ¢'',mb_ok+MB_ICONHAND);
exit;
end
s_sql:=''PassNo=''''''+edtPassBeh.text + edtPassAfter.text+'''''''';
with dm.ADO_getresult do //check the passno
begin
try
fun_setfind(''Antibody'',''''PassNoBef''+''PassNoAfter'''',S_sql);
if not Eof then
begin
application.MessageBox(''¸ÃÌõÂëÒÑ´æÔÚ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);
exit;
end;
except
application.MessageBox(''Êý¾Ý¿âÁ´½Ó²»ÉÏ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);
exit;
end;
close;
end;
S_sql:='' and PassNobef=''''''+edtPassNobef.Text+'''''' and PassNoAfter=''''''+edtPassNoAfter.Text+'''''' and Nameone=''''''+eddy.Text+'''''' and Name=''''''+edtName.Text+
'''''' and FOrmat=''''''+edtFormat.Text+'''''''';
with dm.ADO_getresult do
begin
try
fun_setfind(''AntiBody'',''''PassNoBef''+''PassNoAfter'''',S_sql);
if not Eof then
begin
application.MessageBox(''ÎïÆ·²»Ïà·û'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);


exit;
end;
except
application.MessageBox(''Êý¾Ý¿âÁ´½Ó²»ÉÏ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);
exit;
end;
close;
end;
S_field:=''''''''+barcode.Text+'''''',''''''+code.text+'''''',''''''+Pname.Text+'''''',''''''+xh.text+'''''',''''''+cd.text+'''''',''''''+gg.text+'''''',''''''+eddy.text+'''''',''''''+e_color.Text+'''''''';
S_val:=fun_setinsert(''AntiBody'',''PassNobef,PassNoAfter,NameOne,Number,Format,Number'',S_field,'''');
if S_val=''s'' then
begin
application.MessageBox(''Ôö¼Ó³É¹¦£¡'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation)
end
else if S_val=''e'' then
begin
application.MessageBox(''Ö´Ðгö´í£¡'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation)
end;
S_id:='''';
edtPassNobef.Text:='''';
edtPassNoAfter.Text:='''';
edtNameOne.Text:='''';
edtNumber.Text:='''';
edtFormat.Text:='''';
eddy.Text:='''';
pname.Text:='''';
E_color.Text:='''';
end;

end
else
if (edtPassBeh.Text='''')or(length(edtPassBeh.Text)<5)or (edtFormat.Text='''')or(edtLabel.Text='''')or(edtName.Text='''')or(edtNumber.Text='''')or(edtPassBeh.Text='''')or(edtPassBeh.Text='''') then
begin
application.MessageBox(''ÊäÈë¸ñʽ´íÎó!'',''ÌáʾÐÅÏ¢'',mb_ok+MB_ICONHAND);

exit;
end
s_sql:=''PassNo='''''' + edtPassBeh.text ''''+ edtPassafter.text'''''''';
with dm.ADO_getresult do //check the passno
begin
try
fun_setfind(''Antibody'',''''PassNoBef''+''PassNoAfter'''',S_sql);
if not Eof then
begin
application.MessageBox(''¸ÃÌõÂëÒÑ´æÔÚ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);
exit;
end;
except
application.MessageBox(''Êý¾Ý¿âÁ´½Ó²»ÉÏ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);

exit;
end;
close;
end;
S_sql:='' and PassNobef=''''''+edtPassNobef.Text+'''''' and PassNoAfter=''''''+edtPassNoAfter.Text+'''''' and Nameone=''''''+eddy.Text+'''''' and Name=''''''+edtName.Text+
'''''' and FOrmat=''''''+edtFormat.Text+'''''''';
with dm.ADO_getresult do
begin
try
fun_setfind(''AntiBody'',''''PassNoBef''+''PassNoAfter'''',S_sql);
if not Eof then
begin
application.MessageBox(''ÎïÆ·²»Ïà·û'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);
exit;
end;
except
application.MessageBox(''Êý¾Ý¿âÁ´½Ó²»ÉÏ'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation);


exit;
end;
close;
end;
S_field:=''''''''+barcode.Text+'''''',''''''+code.text+'''''',''''''+Pname.Text+'''''',''''''+xh.text+'''''',''''''+cd.text+'''''',''''''+gg.text+'''''',''''''+eddy.text+'''''',''''''+e_color.Text+'''''''';
S_val:=fun_setinsert(''AntiBody'',''PassNobef,PassNoAfter,NameOne,Number,Format,Number'',S_field,'''');
if S_val=''s'' then
begin
application.MessageBox(''Ôö¼Ó³É¹¦£¡'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation)
end
else if S_val=''e'' then
begin
application.MessageBox(''Ö´Ðгö´í£¡'',''ÌáʾÐÅÏ¢'',mb_ok+mb_iconinformation)
end;
S_id:='''';
edtPassNobef.Text:='''';
edtPassNoAfter.Text:='''';
edtNameOne.Text:='''';
edtNumber.Text:='''';
edtFormat.Text:='''';
eddy.Text:='''';
pname.Text:='''';
E_color.Text:='''';
end;

8楼: 还没改完,wrong : missing opertor or semicolon

9楼: 把“s_sql:=''PassNo=''''''+edtPassBeh.text + edtPassAfter.text+'''''''';”前后几句贴出来就行了!

10楼: if (edtPassBeh.Text='''')or(length(edtPassBeh.Text)<5)or (edtFormat.Text='''')or(edtLabel.Text='''')or(edtName.Text='''')or(edtNumber.Text='''')or(edtPassBeh.Text='''')or(edtPassBeh.Text='''') then
begin
application.MessageBox(''ÊäÈë¸ñʽ´íÎó!'',''ÌáʾÐÅÏ¢'',mb_ok+MB_ICONHAND);
exit;
end
s_sql:=''PassNo=''''''+edtPassBeh.text + edtPassAfter.text+'''''''';


with dm.ADO_getresult do //check the passno

11楼: 引用时不要引用CLX的单元而引用VCL的单元,如果没有相对应的VCL单元可以将需要的DLL文件同你的程序一起发布就可以了

12楼: 怎么判断那个是clx和vcl 如药品进销存管理软件

13楼: 你是要合成一个复杂的SQL语句?
fun_setfind(''AntiBody'',''''PassNoBef''+''PassNoAfter'''',S_sql);函数是做什么的?看着调用方式有些别扭!

记账软件版14楼: 选择控件 然后按F1 看帮助主题里是否有带(Visual Component Library Reference Help) 字样的帮助

15楼: 我用到得是qprints类,不知到有没有其他得相同功能类,那个fun 只是查询功能,后面参数是table ,field,condition

16楼: qprinters 少打了,

17楼: 为什么不用Printers呢?

18楼: 多人接受答案了。