摘要:
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(); ... 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
<script type="text/javascript">enter代替登陆按钮 $(document).ready(function () { $("html").die().live("keydown", function (event) { if (event.keyCode == 13) { $("#btnLogin").click(); return false; } return true; }); });登陆的前... 阅读全文