下面给出了一个合并功能,该功能旨在合并文件夹中的所有docx文件并生成合并的文件。
public void Merge()
{
try
{
string sid = Request.QueryString["studid"];
string stud = sid.ToString();
string ds = HttpContext.Current.Server.MapPath(("~\\StudentBinder") + "\\Temp4\\");
if (Directory.Exists(ds))
{
DirectoryInfo d = new DirectoryInfo(ds);
FileInfo[] Files = d.GetFiles("*" + stud + "*.docx");
// stud added for differentiating b/w users
string[] filepaths = new string[Files.Length];
int index = 0;
foreach (FileInfo file in Files)
{
filepaths[index] = file.Name;
index++;
}
using (WordprocessingDocument myDoc = WordprocessingDocument.Open(Server.MapPath(filepaths[0]), true))
{
for (int i = 1; i < filepaths.Length; i++) …Run Code Online (Sandbox Code Playgroud) 此查询返回无法绑定的多部分标识符
table2.AId and table1.LId = table2.LId
Run Code Online (Sandbox Code Playgroud)
查询是
insert into table1(col1)
select col2 from table2
where table1.AId = table2.AId and table1.LId = table2.LId;
Run Code Online (Sandbox Code Playgroud)
非常感谢你的帮助