sqlserver删除数据库中所有的表 09/08/2011 | jiangws2002 sqlserver删除数据库中所有的表 如果由于外键约束删除table失败,则先删除所有约束: –/第1步**********删除所有表的外键约束*************************/ DECLARE c1 cursor for select ‘alter table [‘+ object_name(parent_obj) + ‘] drop constraint [‘+name+’]; ‘ from sysobjects where xtype = ‘F’ open c1 declare @c1 varchar(8000) fetch next from c1 into @c1 while(@@fetch_status=0) begin exec(@c1) fetch next from c1 into @c1 end close c1 deallocate c1 –/第2步**********删除所有表*************************/ use 数据库名(是要删除表的所在的那个数据库的名称) GO declare @sql… Read More
About Log4Net在WEB中应用 08/08/2011 | jiangws2002 如何使用log4net在Web中应用?其实很简单,你只要对程序作如何修改即可: 1.在common中加入log4netHelper.cs public class log4netHelper { public static void debug(string message) { log4net.ILog log = log4net.LogManager.GetLogger(“Test”); if (log.IsDebugEnabled) { log.Debug(message); } log = null; } public static void error(string message) { log4net.ILog log = log4net.LogManager.GetLogger(“Test”); if (log.IsErrorEnabled) { log.Error(message); } log = null; } public static void fatal(string message) { log4net.ILog log = log4net.LogManager.GetLogger(“Test”); if… Read More
ASP.NET程序中常用的三十三种代码 24/07/2011 | jiangws2002 1. 打开新的窗口并传送参数: 传送参数: response.write(“<script>window.open(‘*.aspx?id=“+this.DropDownList1.SelectIndex+”&id1=“+…+”‘)</script>“) 接收参数: string a = Request.QueryString(“id”); string b = Request.QueryString(“id1”); 2.为按钮添加对话框 Button1.Attributes.Add(“onclick”,”return confirm(‘确认?’)”); button.attributes.add(“onclick”, ”if(confirm(‘are you sure…?’)){return true;}else{return false;}”) 3.删除表格选定记录 int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; string deleteCmd = “DELETE from Employee where emp_id = “ + intEmpID.ToString() 4.删除表格记录警告 private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) { switch(e.Item.ItemType) { case ListItemType.Item : case ListItemType.AlternatingItem : case… Read More
Problem in QQ’s install(side by side) 19/07/2011 | jiangws2002 When I reinstall QQ, there is a problem like: “application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.” refer to http://www.sevenforums.com/general-discussion/19958-qq-x_x-side-side-config.html then download: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14431 OK!… Read More
How to use Subversion? 14/07/2011 | jiangws2002 1. Setup your Subversion Server; 2. Setup your repository; 3. Using TortoiseSVN to connect to the repository a)Import: import your local files to repository; b)Checkout: get files from your repository and SVN will make hidden files and folders in the checkout folder; c)Add: add file to your local repository; d)Commit: commit file to your repository(server)… Read More
接电话技巧 30/05/2011 | jiangws2002 解释不能接电话的原因 A.她外出不在 1. She is not in (out). 2. She is away from her desk (not at her desk). 3. She is out for lunch. 4. She is out for the rest of the day. 5. She has left already. 6. She hasn’t come in yet. 7. She’s just stepped out Receiver: 她外出不在 1. 她不在… Read More
Subordination 25/05/2011 | jiangws2002 Although she is late for work, (but -> wrong) her supervisor does not mind.… Read More
Could you repeat that , please? 25/05/2011 | jiangws2002 repeat that ->right repeat again ->wrong = Could you say again, please?… Read More