随笔分类 - Database
[新手点滴] IDbCommand.Prepare()方法。
摘要:一个可以有助于提高command执行效率的方法:)
阅读全文
[ADO.NET]由数据库触发器引发的问题
摘要:前一段时间在数据库中用了触发器后发现了一个问题:如果触发器中修改了某个表中的数据的话,那么用ExecuteNonQuery方法执行一个SQL语句的时候,返回的值将是触发器所影响的行数和sql语句本身所影响的行数的总和。这个问题,对于以往通过ExecuteNonQuery方法的返回值来得知当前SQL语句修改了当前表中几条记录的程序来说,就带来了些麻烦。
阅读全文
The Maximum Number of Bytes Per Row in SQL Server 2000 -- 8060.
摘要:Tody, I created a table with three columns are of data type varchar(8000), and a warning was prompted out in the SQL Query Analyzer: “Warning: The table 'TestTable' has been created but its maximum ro...
阅读全文
A Security Problem Caused by xp_cmdshell in SQL Server.
摘要:Today, one of my colleagues demonstrated how to use the extended stored procedure xp_cmdshell to activate the windows Guest account and clear the password of that account, and thenadd theGuest accou...
阅读全文
Creating recurive stored procedures in T-SQL.
摘要:In SQLServer, I tried to define a stored procedure to recursively invoke itself (See the following T-SQL statements). However, the maximum nesting level of recursion is 30 (Tested under SQL Server 200...
阅读全文
How to enable SQL Debugging.
摘要:SQL Server has a built-inextended stored procedure,named sp_sdidebug, the permission towhich is necessary for a user tohave the capabilityof debugging stored procedures. To grant the permission, ...
阅读全文