菜菜吃菜
2022-07-02 10:22
采纳率: 56.9%
浏览 16

多ID条件查询文件内容,输出table

 string sql = "SELECT ID FROM DeviceInfo WHERE DevLabel LIKE '%" + textEdit24.Text.Trim() + "%'"; //查询结果 获得ID值
            if (isCompress)
            {
                mcFile = fileName.Substring(0, fileName.Length - 1);
                if (!File.Exists(mcFile))
                    DeZip(fileName, mcFile);
            }
           
            long dianID = Convert.ToInt64(textEdit42.Text.ToString());
            DateTime dt1 = dateTimePicker35.Value;
            DateTime dt2 = dateTimePicker34.Value;

            DataTable dataTable = ReadFile(mcFile, false, dt1, dt2, dianID, true, 0); //根据ID查询文件内容
         
            dataTable.AcceptChanges();
            gridControl14.DataSource = dataTable;

查询出多个结果ID,现在只能显示出一个结果,怎样写将查询出的多个ID值到文件夹中查询,输出到dataTable

1条回答 默认 最新

相关推荐 更多相似问题