Encoding.....

if you try to write sinhala text file using .net as follows using ASCII you will see the output as shown in this figure.
StreamWriter swutf8 = new StreamWriter("utf8.txt", false,Encoding.ASCII);
swutf8.WriteLine("හෙෙලා්");
swutf8.Close();
but you will get the correct sinhala text if you use unicode instead of ASCII
StreamWriter swutf8 = new StreamWriter("utf8.txt", false,Encoding.UTF8);
swutf8.WriteLine("හෙෙලා්");
swutf8.Close();
sql server- how to get the month name of a datetime field
datename(month,'5/1/06'); or
datename(month,datetime_field);
For web developers who are using SKype
if you get an error when trying to deploy ssrs reports as shown in figure. then go to iis management console. then you will see your iis default web site has been stopped. try starting it and then you'll get an error showing you can't start the web site.
if you are using skype. then it might be using port 80. so go to tools>options and uncheck the checkbox as shown.


Solution for sql server error in dropping database: The server principal 'DOMAIN\NAME' already exists.
If it's a SQL user, you can try:
EXEC sp_droplogin 'loginName'
or for a domain account:
EXEC sp_revokelogin 'loginName'
If they are still users on a db(s), you will have to drop the users first:
USE dbName
EXEC sp_dropuser 'username'
Naturally script out or write down all existing permissions before deleting existing users and login.
The permissions granted to user 'User-PC\User' are insufficient for performing this operation. (rsAccessDenied)
The permissions granted to user 'User-PC\User' are insufficient for performing this operation. (rsAccessDenied)
if you get this error in ssrs 2005 when connecting to report server http://localhost/reportserver do the following steps
1 go to sql server management studio and run it as administrator
2 select reporting services from the dropdown list and connect to the reporting services database
3 right click on the home folder and create the user or usergroup that you want to give permission to and set the permisssions.
Error Connecting SSRS 2005
if you could not connect to Sql server reporting services 2005 displaying a message box saying that "access is denied" and "cannot connect to the server" and thereafter gets an exception. the reason might be your SQl SERVER 2005 SP1. to resolve this
install sql server 2005 sp2....