摘要: use 你要清空的數據庫godeclare @tbname varchar(250)declare #tb cursor for select name from sysobjects where objectproperty(id,'IsUserTable')=1open #tbfetch next from #tb into @tbnamewhile @@fetch_status=0begin exec('delete from ['+@tbname+']') fetch next from #tb into @tbnameendclose 阅读全文
posted @ 2011-05-21 12:18 Yaoquan.Luo 阅读(175) 评论(0) 推荐(0)
摘要: 打開'xp_cmdshell'EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE; EXECmaster..xp_cmdshell'bcp"Select*fromAAA.dbo.Role"queryout"D:\AAA\Users\AAA\DbExport\111est.txt"-c-t"|"-r"|\n&qu 阅读全文
posted @ 2011-05-21 12:02 Yaoquan.Luo 阅读(278) 评论(0) 推荐(0)
摘要: Hi,Thank you for the sample project.Please set your GridView.AppearancePrint.Row.Font property value to "Arial Unicode MS":...gridView1.AppearancePrint.Row.Font = new System.Drawing.Font("Arial Unicode MS", 8.25F);gridView1.AppearancePrint.Row.Options.UseFont = true;...I hope thi 阅读全文
posted @ 2011-05-21 11:08 Yaoquan.Luo 阅读(300) 评论(0) 推荐(0)
摘要: 1ifexists(select1fromsysobjectswherename='File2Table'andobjectproperty(id,'IsProcedure')=1)2dropprocedureFile2Table3go4createprocedureFile2Table5@servernamevarchar(200)--服务器名6,@usernamevarchar(200)--用户名,如果用NT验证方式,则为空''7,@passwordvarchar(200)--密码8,@tbnamevarchar(500)--数据库.dbo. 阅读全文
posted @ 2011-05-21 09:45 Yaoquan.Luo 阅读(290) 评论(0) 推荐(0)
摘要: 一、問題描述使用 xp_cmdshell 出現如下錯誤訊息,該如何處理?訊息 15281,層級 16,狀態 1,程序 xp_cmdshell,行 1SQL Server 已封鎖元件 'xp_cmdshell' 的 程序 'sys.xp_cmdshell' 之存取,因為此元件已經由此伺服器的安全性組態關閉。系統管理員可以使用 sp_configure 來啟用 'xp_cmdshell' 的使用。如需有關啟用 'xp_cmdshell' 的詳細資訊,請參閱《SQL Server 線上叢書》中的<介面區組態>(Surface Area 阅读全文
posted @ 2011-05-21 09:36 Yaoquan.Luo 阅读(590) 评论(0) 推荐(0)
摘要: SQL语句导入导出大全/**//*******导出到excelEXECmaster..xp_cmdshell’bcpSettleDB.dbo.shanghuoutc:\temp1.xls-c-q-S"GNETDATA/GNETDATA"-U"sa"-P""’/***********导入ExcelSELECT*FROMOpenDataSource(’Microsoft.Jet.OLEDB.4.0’,’DataSource="c:\test.xls";UserID=Admin;Password=;Extendedpro 阅读全文
posted @ 2011-05-21 09:34 Yaoquan.Luo 阅读(238) 评论(0) 推荐(0)