Tuesday, December 23, 2008

NET HELPMSG

To provide help with a Windows error message (Typically the 4 digit number from the Event Viewer system log)


Type the following in a command prompt

NET HELPMSG message#
e.g.
NET HELPMSG 2184

Tuesday, December 16, 2008

Rare issue while deleting full text catalog in SQL server 2005

select * from sysfulltextcatalogs

This Lists all the full text catalogs present for the selected table. This table contains the catalog name and the path where these are physically stored.

In case of broken index or to delete a catalog after restoring database form an external source, update the path to a physical drive present in server. ( These steps to be followed only when the there is mismatch of catalog path in the new server or the SUBST command has failed )

update dbo.sysfulltextcatalogs set path='D:\Full Text Catalog' where ftcatid=X

by default update on sysfulltextcatalogs table is disabled, run the following script to enable this.

exec sp_configure 'allow updates',1
go
reconfigure with override

Wednesday, December 3, 2008

Rails logger article

info on logger :

http://dev.ctor.org/doc/devel-logger/classes/Logger.html

Use of concat tag

This example shows how to use concat tags in helper class, also note the use of rendering partial template inside this.


def content_headers(header = '', sub_header = '', options = {}, &block)
if !options.has_key?(:if) || options[:if]
content_body = capture(&block)
concat(render(:partial => 'shared/content_headers',
:locals => { :body => content_body, :header => header, :sub_header => sub_header }),
block.binding)
end

end