摘要: public SqlConnection con() { return new SqlConnection("server=192.168.11.3;uid=sa;pwd=1qaz2WSX;database=bjkwSQ"); } protected void Button1_Click(object sender, EventArgs e) { //Web.Config配置的路径 string str3 = ConfigurationManager.AppSettings["oldpath"].ToString(); ... 阅读全文
posted @ 2013-03-08 10:11 小女人心态 阅读(579) 评论(0) 推荐(0) 编辑
摘要: SqlConnection Connection = con(); string sql = "select * from t_applySubject where t_applyType='000003'";(根据要求可以更改sql语句)DataSet ds = new DataSet(); SqlCommand cmd = new SqlCommand(sql, Connection); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); DataTable dt = ds.Tables[0 阅读全文
posted @ 2013-03-06 14:59 小女人心态 阅读(179) 评论(0) 推荐(0) 编辑
摘要: SqlConnection mycon = con(); string sqlstr = "insert into Address select 姓名, 备注,null from OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 5.0;HDR=YES;DATABASE=D:\\Book1.xlsx',sheet2$)";(如果excel是07版本一下的'Microsoft.ACE.OLEDB.12.0'变成'Microsoft.ACE.OLEDB.4.0') SqlCo 阅读全文
posted @ 2013-03-06 14:56 小女人心态 阅读(181) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript">enter代替登陆按钮 $(document).ready(function () { $("html").die().live("keydown", function (event) { if (event.keyCode == 13) { $("#btnLogin").click(); return false; } return true; }); });登陆的前... 阅读全文
posted @ 2013-01-16 16:32 小女人心态 阅读(145) 评论(0) 推荐(0) 编辑