摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->string filePath = @"/Dir/aa.txt"; //相对路径System.Diagnostics.Process.Start(Server.MapPath(filePath));
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->string path="/Dir/01.txt"; //文件相对路径string Files = Server.MapPath(path); if (File.Exists(Files)) { try { System.IO.FileInfo DownloadFile = new System.IO.FileInfo(Files); string fileName = Do
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#region 获取页面地址 /// <summary> /// 获取页面地址 /// </summary> /// <returns></returns> public static string GetUrl() { string strTemp = "http://"; if (System.Web.HttpContext
阅读全文
摘要:文件类型验证 protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { fileExt = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExt == ".jpg" || fileExt == ".gif") { try { FileUpload1.SaveAs(Server.MapPath("upload") + "\\" + F
阅读全文
摘要:一、在数据库里,我有一个表tb1的结构如下:用一条SQL语句返回这个表的列名、类型及大小,如下:实现的SQL语句为:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SELECT c.name As 'colName', t.name 'colType', c.prec 'colSize'FROM systypes t,syscolumns cWHERE t.xtype=c.xtypeAND c.
阅读全文
摘要:SQL查询Excel文件的语句:SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=D:\hxl\gxjt\gxjt\pay\excel\list.xls;Extended Properties=Excel 8.0; HDR=YES; IMEX=1')...Sheet1$注:如遇到如下问题:1)、已拒绝对 OLE DB 访问接口 'Microsoft.Jet.OLEDB.4.0' 的即席访问。必须通过链接服务器来访问此访问接口。 答:登录数据库用户必须具有sa权限
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->declare @totalNum intSet @totalNum=5declare @indextable1 table(id int identity(1,1),totalNum int)declare @i intSEt @i=0while @i<@totalNumbegininsert into @indextable1(totalNum) values(@totalNum)Se
阅读全文
摘要:C++中,设置中文简体Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include<locale>setlocale(LC_ALL,"chs");
阅读全文