2011年12月6日

store procedure

摘要: create procedure AddMatch@resultname nvarchar(10)with encryptionas if exists(select resultid from MatchResult where resultname = @resultname )begin print 'Don't store'endelsebegin insert into MatchResult(resultname) value (@resultname) print 'store'endexecute AddMatch 'redwin 阅读全文

posted @ 2011-12-06 18:12 qih33 阅读(166) 评论(0) 推荐(0)

2011年11月5日

default gateway

摘要: In computer networking, a default gateway is the device that passes traffic from the local subnet to devices on other subnets. The default gateway often connects a local network to the Internet, although internal gateways for local networks also exist. 阅读全文

posted @ 2011-11-05 16:40 qih33 阅读(246) 评论(0) 推荐(0)

2011年11月2日

@@IDENTITY

摘要: After an INSERT, SELECT INTO, or bulk copy statement is completed, @@IDENTITY contains the last identity value that is generated by the statement. If the statement did not affect any tables with identity columns, @@IDENTITY returns NULL. If multiple rows are inserted, generating multiple identity va 阅读全文

posted @ 2011-11-02 18:51 qih33 阅读(113) 评论(0) 推荐(0)

2011年10月31日

数据库命令delete和truncate的区别

摘要: DELETE语句执行删除的过程是每次从表中删除一行,并且同时将该行的的删除操作作为事务记录在日志中保存以便进行进行回滚操作。TRUNCATE TABLE 则一次性地从表中删除所有的数据页并不把单独的删除操作记录记入日志保存,删除行是不能恢复的。并且在删除的过程中不会激活与表有关的删除触发器。执行速度快。 阅读全文

posted @ 2011-10-31 18:31 qih33 阅读(153) 评论(0) 推荐(0)

2011年8月12日

SCOPE_IDENTITY

摘要: qwerqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq 阅读全文

posted @ 2011-08-12 03:23 qih33 阅读(96) 评论(0) 推荐(0)

2011年7月18日

事务的4个基本特征

摘要: Atomic(原子性):事务中包含的操作被看做一个逻辑单元,这个逻辑单元中的操作要么全部成功,要么全部失败。Consistency(一致性):只有合法的数据可以被写入数据库,否则事务应该将其回滚到最初状态。Isolation(隔离性):事务允许多个用户对同一个数据进行并发访问,而不破坏数据的正确性和完整性。同时,并行事务的修改必须与其他并行事务的修改相互独立。Durability(持久性):事务结束后,事务处理的结果必须能够得到固化。 阅读全文

posted @ 2011-07-18 17:24 qih33 阅读(310) 评论(0) 推荐(0)

2011年7月9日

ASP.NET Cookies

摘要: A cookie is a small bit of text that accompanies requests and pages as they go between the Web server and browser. The cookie contains information the Web application can read whenever the user visits the site. For example, if a user requests a page from your site and your application sends not just 阅读全文

posted @ 2011-07-09 19:52 qih33 阅读(107) 评论(0) 推荐(0)

2011年7月6日

HttpServerUtility.Mappath, Page.MapPath, Server.MapPath的区别

摘要: HttpServerUtility 是一个类,其中定义了 MapPath 方法。我们通过这个类的对象实例来使用 MapPath 方法。Page.MapPath 是页面类 Page 的一个方法,这个方法内部还是通过 HttpServerUtility 的对象来实现 MapPath 方法的。这样在页面上可以更加方便使用。Server 是 HttpContext 和 Page 的一个属性,Page 的 Server 属性返回的其实就是 HttpContext 中的 Server。这个属性的类型就是 HttpServerUtility。所以,在 ASP.NET 中最终都是通过 HttpServerUt 阅读全文

posted @ 2011-07-06 21:35 qih33 阅读(400) 评论(0) 推荐(0)

2011年7月4日

C# Path Examples

摘要: You need ways to deal with filenames and paths in Windows in your C# programs. Windows uses different directory separators than other platforms. Additionally, you have to escape the \ character as \\, making the syntax harder to understand. Here we see how to use the excellent Path class in the .NET 阅读全文

posted @ 2011-07-04 13:37 qih33 阅读(780) 评论(0) 推荐(0)

System.IO 读写二进制、字符串、byte[]

摘要: 读写二进制的类:System.IO.BinaryReaderSystem.IO.BinaryWriter读写字符串的类:System.IO.TextReaderSystem.IO.TextWriterTextReader、TextWriter 是抽象类,我们一般用其子类:System.IO.StreamReaderSystem.IO.StreamWriterSystem.IO.StringReaderSystem.IO.StringWriter读写 byte[] 的类:System.IO.StreamStream 下面有很多子类,比如:FileStream。Stream 中的东西实际上是被 S 阅读全文

posted @ 2011-07-04 12:17 qih33 阅读(442) 评论(0) 推荐(0)

导航