摘要: 1.设置web.config文件。(我不喜欢设置成这样) <system.web> ...... <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312" /> ...... </system.web>或者:aspx文件中:<meta http-equiv="Content-Type" content=&q 阅读全文
posted @ 2011-05-22 15:05 炒米饭 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 一.用SqlConnection连接SQL Server1..加入命名空间using System.Data.SqlClient;2.连接数据库SqlConnection myConnection = new SqlConnection();myConnection.ConnectionString = "user id=sa;password=sinofindb;initial catalog=test;data source=127.0.0.1;Connect Timeout=30";myConnection.Open();改进(更通用)的方法:string MySql 阅读全文
posted @ 2011-05-22 14:47 炒米饭 阅读(183) 评论(0) 推荐(0) 编辑