标题:[求助]关于文件输出的问题
只看楼主
shupingda
Rank: 1
等 级:新手上路
帖 子:57
专家分:0
注 册:2006-11-1
 问题点数:0 回复次数:0 
[求助]关于文件输出的问题
string path1;
path1=pp+"\\page\\tm.doc";
if (this.progressBar1.Value == this.progressBar1.Maximum)
{ timer1.Enabled = false;
showtest();
FileStream fs=new FileStream(path1,FileMode.Create,FileAccess.ReadWrite);
con = new SqlConnection("data source=spd;initial catalog=exam;user id=sa;password=123");
da = new SqlDataAdapter("select * from sj_table", con);
SqlCommandBuilder cb = new SqlCommandBuilder(da);
con.Open();
ds = new DataSet();
da.Fill(ds, "sj");
byte[] rtf1 =(byte[])ds.Tables["sj"].Rows[0][2];
byte[] rtf2 = (byte[])ds.Tables["sj"].Rows[1][2];
byte[] rtf3 = (byte[])ds.Tables["sj"].Rows[2][2];
int len1 = rtf1.Length;
int len2 = rtf2.Length;
int len3= rtf3.Length;
fs.Write(rtf1, 0, len1);

fs.Write(rtf2, 0, len2);
fs.Write(rtf3, 0, len3);
fs.Close();
con.Close();
为什么我只有第一次都出来的显示在WORD 中了,后两句怎么不显示在WORD 中啊
搜索更多相关主题的帖子: 文件 输出 
2006-12-09 10:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-108293-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.002838 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved