C# MySQL数据导入TXT文件

来源:百度知道 编辑:UC知道 时间:2024/05/14 05:58:21
如何在VS2005环境中将MySQL数据库(GB2312格式)中的数据导入到TXT文本文件中?如有可行者必追高分奖赏。

我试过导入EXCEL...TXT的没有

protected void lbtnOutExcel_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=OnLineUser.xls");
Response.Charset = "utf8";
Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);

gridCallTb.AllowPaging = false;
LoadTableBind();
gridCallTb.RenderControl(htmlWrite);

Response.Write(stringWrite.ToString());
Response.End();

gridCallTb.AllowPaging = true;
LoadTableBind();
}
public override void VerifyRenderingInServerForm(Control control) { }