Thursday, July 29, 2010

Change UPPER CASE to Title Case / Proper Case - supports all punctuation

create function ProperCase(@Text as varchar(8000))
returns varchar(8000)
declare @Reset bit;
declare @Ret varchar(8000);
declare @i int;
declare @c char(1);

select @Reset = 1, @i=1, @Ret = '';

while (@i <= len(@Text))
select @c= substring(@Text,@i,1),
@Ret = @Ret + case when @Reset=1 then UPPER(@c) else LOWER(@c) end,
@Reset = case when @c like '[a-zA-Z]' then 0 else 1 end,
@i = @i +1
return @Ret

select dbo.ProperCase('this,my friends, is a test.wHat DO you think?i like shaquile o''neal')

Sunday, March 29, 2009

Post from email Really?

This is apparently how you post from email…

How to convert Access DB to SQL 2005 DB

You need to use: SQL Server Migration Assistant for Access (SSMA for Access)

Wednesday, March 11, 2009 development server stopped working development server stopped working
just like on 10/03/09 ? Yeah thank MicroSoft for that they released an update on Windows Defender that defends you from working.

Stupid thing changes hosts file to some apparently IPv6 shite but messes up ur developmet server

Here is what to do:

1. Locate the hosts file with notepad "C:\Windows\System32\drivers\etc\hosts"
2. Find line that says "::1 localhost"
3. Replace it with " localhost"
4. Save
5. Windows defender is gonna notify you that you might got hijacked!
6. Tell it to go fuck itself

Job Done - you can work again!

Sunday, March 08, 2009

How to change CurrentCulture CultureInfo in

Had a problem with ASP.NET site with the LIVE webhosting site beeing in the US and it was not formating my dates the way I wanted them by default.

Add this code to change CurrentCulture to whatever you want:

Dim ci As New System.Globalization.CultureInfo("EN-GB")
System.Threading.Thread.CurrentThread.CurrentCulture = ci
System.Threading.Thread.CurrentThread.CurrentUICulture = ci

Tuesday, February 10, 2009

Terminal Services License Crack


Go to %WINDIR%\system32\lserverNotice the file TSLIC.edb. Rename it to tslic.old


In every client computer, remove the CAL TS registry keys, located


Restart your server.



1. UnInstall the Terminal Server Licensing
2. Install the Terminal Server Licensing again
3. Restart server


1. Delete the whole key called : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing

Wednesday, February 04, 2009

Sony Ericsson P1i won't play video from

When you are connected using WIFI to your own network and you can browse the web ok with the P1i but you go to (mobile youtube that has videos in 3gp format for mobile devices) and you click Watch Video - the phone would buffer it to 100% but then say could not connect to the specified location.


Problem is with your router blocking the ports that are needed by the P1i to stream the video.

1. Assign a static IP to the phone (example (this is for security so that you don't open the ports to all devices on your network)
2. On your router under Open ports setup to that IP (

3. Setup the port redirection table as per the picture below

Sony Ericsson P1i won't connect to 802.11g network 54g - Could not locate remote server

Had a problem with my Sony P1i - it would connect to a 802.11b networks ok but when it was connected to a 802.11g network it would connect ok but on browsing th web the message:

Could not locate remote server

Would always come up.

Updating the phone's software using the Sony Software that came with the phone fixes this issue

Sunday, December 21, 2008

How to change password for sa login in management studio

How to change password for sa login in management studio

1. Security/Logins/sa - right click Properties / General TAB

more info: