摘要:
osql.exe -S %TARGETSERVER% -E -d Northwind -Q"select db_id()" > nulif %errorlevel% == 0 ( @echo. @echo Northwind DB already exists. @echo. goto end)@echo.@echo Creating Northwind DB ...@echo.osql.e... 阅读全文
摘要:
'CString' to 'std::string':std::string cannot always construct from a LPCTSTR i.e. the code will fail for UNICODE builds.So the following conversion will lead to error:CString cs("Hello");std::string ... 阅读全文
摘要:
Original link: http://www.codeguru.com/forum/showthread.php?t=436716A: An easy way is to use FindFirstChangeNotification, FindNextChangeNotification and one of the wait functions in a worker thread. A... 阅读全文
摘要:
1. #ifndef HEADER_BASE_HPP#define HEADER_BASE_HPP class base_class{ // some code};#endif // HEADER_BASE_HPPThe first line checks whether we have not yet defined 'HEADER_BASE_HPP'. If we have not, then... 阅读全文
摘要:
在Windows的shellapi文件中定义了一个名为SHFileOperation()的外壳函数,用它可以实现各种文件操作,如文件的拷贝、删除、移动等,该函数使用起来非常简单,它只有一个指向SHFILEOPSTRUCT结构的参数。使用SHFileOperation()函数时只要填写该专用结构--SHFILEOPSTRUCT,告诉Windows执行什么样的操作,以及其它重要信息就行了。SHFile... 阅读全文
摘要:
Original link: http://www.codeguru.com/forum/showthread.php?t=269905Q: Why does program work in debug mode, but fail in release mode?A: First of all, there is no such thing as 'debug mode' or 'release... 阅读全文
摘要:
Original link: http://www.sqlservercentral.com/scripts/63782/This has been tested on SQL 2000, 7 and 2005 databases very successfully. 40 GB went down to under 1 GB, 176GB went down to 105MB/*Shrink a... 阅读全文
摘要:
create proc sp_default_collation as set nocount on declare @servercollation sysname select @servercollation = convert(sysname, serverproperty('collation')) if @servercollation is not NULL BEGIN sele... 阅读全文
摘要:
Using xp_fixeddrives to Monitor Free Space By Gregory A. Larsen As a DBA one of your responsibilities is to monitor disk space. You always need to make sure you have enough for your databases, databa... 阅读全文
摘要:
SQL Server 2005 新增 cross apply 和 outer apply 联接语句,增加这两个东东有啥作用呢? 我们知道有个 SQL Server 2000 中有个 cross join 是用于交叉联接的。实际上增加 cross apply 和 outer apply 是用于交叉联接表值函数(返回表结果集的函数)的,更重要的是这个函数的参数是另一个表中的字段。这个解释可能有些含... 阅读全文