摘要:
insert into 要插入的表 select 列 from OpenRowSet('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=Yes;IMEX=1;Database=上传的路径或者读取的路径', 'select * from [Sheet1$]') 阅读全文
摘要:
string filename = DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"; List<Dictionary<string, object>> arr = new List<Dictionary<string, object>>(); arr = Bus.Bus.Select(@"select * from HAP_StorageInfoMiddle where HAP_SelUserCode='"+Session[&qu 阅读全文
摘要:
//private void sendMail(string MailCode, string MailPwd, string MailTo, string Titlle, string Content) //{ // string str = "smtp." + MailCode.Substring(MailCode.IndexOf('@') + 1, MailCode.Length - MailCode.IndexOf('@') - 1); // SmtpClient _smtpClient = new SmtpClient(); // 阅读全文
摘要:
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using iTextSharp;using iTextSharp.text;using iTextSharp.text.pdf;using Sy 阅读全文
摘要:
SQL查询今天的记录:datediff(day,[Datetime],getdate())=0 把Datetime换为你的相应字段;SQL查询昨天的记录:datediff(day,[Datetime],getdate())=1 把Datetime换为你的相应字段,getdate()-Datetime即为时间差。?本月记录:SELECT * FROM 表 WHERE datediff(month,[dateadd],getdate())=0?本周记录:SELECT * FROM 表 WHERE datediff(week,[dateadd],getdate())=0? 阅读全文