首页 新闻 会员 周边

怎样将从数据库下载的word文档,复制到剪贴板,再粘贴到系统中的任何位置

0
悬赏园豆:50 [已关闭问题] 关闭于 2012-07-14 09:27
dataSet = SqlHelper.ExecuteDataset(SqlHelper.connStr, CommandType.StoredProcedure, procName, new SqlParameter(fieldFileName, fileName));
            table = dataSet.Tables[0];
            string path = @"C:\Users\Administrator\Desktop\" + fileName;
            foreach (DataRow row in table.Rows)
            {
                using (FileStream fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write))
                {
                    byte[] fileByte = (byte[])row[fieldFile];
                    int arraySize = fileByte.Length;
                    fs.Write(fileByte, 0, arraySize);
                }
                Process.Start(path);
            }

以上我的代码,只能实现打开,并复制到桌面

紫砂清壶的主页 紫砂清壶 | 初学一级 | 园豆:4
提问于:2012-07-12 21:24
< >
分享
所有回答(1)
0
artwl | 园豆:16736 (专家六级) | 2012-07-12 21:42

文本,我会,就是不知道像word、pdf这类格式的文件,该怎么弄???

支持(0) 反对(0) 紫砂清壶 | 园豆:4 (初学一级) | 2012-07-13 07:58
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册