摘要:windows service 不能用 directory.getcurrentdirectiry()取当前路径,正确的方法是 var location = System.Reflection.Assembly.GetEntryAssembly().Location; var directoryPath = Path.GetDirectoryName(location);
阅读全文
摘要:The first time I wrote a service, I wondered whether we could do something like Listing 4, rather than go to the trouble of adding a timer. (注:我也是这么想的)Listing 4 The unstoppable service.protected override void OnStart(string[] args){ while (true) { // do some work // idle Thread.S...
阅读全文
摘要:1 : 网页重定向Response.Redirect("confirmEstockReload.aspx");2 :按钮重定向 Button1.PostBackUrl = "eStockReload.aspx"; Button2.PostBackUrl = @"..\default.aspx";3 : 设置,读取 session Session["estockResultMsg"] = sMsg; Label1.Text = Session["estockResultMsg"].ToString
阅读全文
摘要:@@rowcountAfter each Transact-SQL statement, the server sets the value of this variable to the total number of records affected by it. It can be used to verify the success of selected operations: select Make, Model, EqTypeid into OldEquipment from Equipment where EqTypeid = 2 if ...
阅读全文
摘要:以下面这个简单的程序为例#include templatestruct EST_TTI_Entry{ float t; CONTAINER::Index i;};int main(){ return 0;}使用 visual studio 2008 编译会提示 1>d:\code\cplusexercise\abouttemplatememberdefaultint\main.cc(7) : error C2146: syntax error : missing ';' before identifier 'i'1>d:\code\cplusexer
阅读全文
摘要:1 : ExecuteNonQuery() Executes non-SELECT commands, such as SQL commands that insert,delete, or update records. The returned value indicates the number of rows affected by the command. You can also use ExecuteNonQuery() toexecute data-definition commands that create, alter, or delete database object
阅读全文