TMP_Str_List_no := '';
with DBGridEh_YingSh_SearchYS do
begin
with DM_Xiao.ADOQuery_xiaoshou_selectyshk do
begin
Selectrow_Count := SelectedRows.Count;
if Selectrow_Count > 0 then
for i := 0 to Selectrow_Count - 1 do
begin
//移到选中的标签处
GotoBookmark(pointer(DBGridEh_YingSh_SearchYS.SelectedRows.Items[i]));
TMP_Str_List_no := TMP_Str_List_no + FieldByName('shk_dh').AsString;
if i <> selectrow_count - 1 then
TMP_Str_List_no := TMP_Str_List_no + ',';
end
else
begin
TMP_Str_List_no := '';
MsgInfo('请选择订单。');
Abort;
end;
end;
end;
with DBGridEh_YingSh_SearchYS do
begin
with DM_Xiao.ADOQuery_xiaoshou_selectyshk do
begin
Selectrow_Count := SelectedRows.Count;
if Selectrow_Count > 0 then
for i := 0 to Selectrow_Count - 1 do
begin
//移到选中的标签处
GotoBookmark(pointer(DBGridEh_YingSh_SearchYS.SelectedRows.Items[i]));
TMP_Str_List_no := TMP_Str_List_no + FieldByName('shk_dh').AsString;
if i <> selectrow_count - 1 then
TMP_Str_List_no := TMP_Str_List_no + ',';
end
else
begin
TMP_Str_List_no := '';
MsgInfo('请选择订单。');
Abort;
end;
end;
end;

本文介绍了一种在特定数据库环境中,通过ADOQuery组件批量查询并整合订单信息的方法,包括定位到选中订单、获取订单编号,并将这些信息整合成字符串的过程。此技术适用于需要高效处理大量订单数据的应用场景。
1157

被折叠的 条评论
为什么被折叠?



