Friday, January 7, 2011

Crystal Report (10.5.***) runtime for VS 2008

Try install CR on server

http://social.msdn.microsoft.com/Forums/en/vscrystalreports/thread/b70c896a-6844-48bb-a966-63a3f589a0f1




"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5"

"CRRedist2008_x86.msi" (for 32bit)
"CRRedist2008_x64.msi" (for 64bit)


or can be downloaded at:
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm

Saturday, November 6, 2010

Using Host file to resolve computer name given IP address

After installing Team Foundation Server 2010 on my virtual machine. I try to get access from my main terminal. But i cannot open it.

host3

At first i thought the tfs web were blocked by the my firewall. But then i try to used ip address of that virtual machine and its appear… huh then i start thinking, is there any problem with my connection to the virtual server?

host0

I still remember i’ve been alter some file in windows to automatic resolve (to recognize) this ip address is for which server name but i cannot remember what file it is.

After googling, then i found this website . The file i’m looking for is hosts it is located under C:\Windows\System32\drivers\etc\

 

host1

Copy hosts file on your desktop and add the desire computer name and ip address

host2

After that, copy and paste it back to C:\Windows\System32\drivers\etc\

Then, when i refresh back the page, it appear .. :D

host4

Wednesday, September 15, 2010

Regex

Regex regex = new Regex(@" ^ # anchor at the start (?=.*\d) # must contain at least one numeric character (?=.*[a-z]) # must contain one lowercase character (?=.*[A-Z]) # must contain one uppercase character .{8,10} # From 8 to 10 characters in length \s # allows a space $ # anchor at the end", RegexOptions.IgnorePatternWhitespace);

Friday, August 13, 2010

error 15023 user already exists in current database

This problem occur when i want to restore database.

error 15023 user already exists in current database


sp_change_users_login 'report'




sp_change_users_login 'update_one','[db username]','[db username]'

Wednesday, April 14, 2010

Conversion before save into database

This is how we want to convert datetime before we store it inside the database

DateTime.ParseExact("01/01/1900", "dd/MM/yyyy", new CultureInfo("ms-MY"));

Monday, December 28, 2009

SQL return list of month

Here is another query which i have modified from my previous post.

This query will list out list of months

SELECT Month(GETDATE()) as MonthNum
UNION
SELECT Month(GETDATE()) - 1 as MonthNum
UNION
SELECT Month(GETDATE()) - 2 as MonthNum
UNION
SELECT Month(GETDATE()) - 3 as MonthNum
UNION
SELECT Month(GETDATE()) - 4 as MonthNum
UNION
SELECT Month(GETDATE()) - 5 as MonthNum
UNION
SELECT Month(GETDATE()) - 6 as MonthNum
UNION
SELECT Month(GETDATE()) - 7 as MonthNum
UNION
SELECT Month(GETDATE()) - 8 as MonthNum
UNION
SELECT Month(GETDATE()) - 9 as MonthNum
UNION
SELECT Month(GETDATE()) - 10 as MonthNum
UNION
SELECT Month(GETDATE()) - 11 as MonthNum
ORDER BY MonthNum DESC


and here is some query to convert month number to month name

Convert Month Number to name SQLServerCurry


And here is a full query:

SELECT Month(GETDATE()) as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE()),-1)) as MonthName
UNION
SELECT Month(GETDATE())-1 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-1,-1)) as MonthName
UNION
SELECT Month(GETDATE()) - 2 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-2,-2)) as MonthName
UNION
SELECT Month(GETDATE()) - 3 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-3,-3)) as MonthName
UNION
SELECT Month(GETDATE()) - 4 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-4,-4)) as MonthName
UNION
SELECT Month(GETDATE()) - 5 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-5,-5)) as MonthName
UNION
SELECT Month(GETDATE()) - 6 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-6,-6)) as MonthName
UNION
SELECT Month(GETDATE()) - 7 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-7,-7)) as MonthName
UNION
SELECT Month(GETDATE()) - 8 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-8,-8)) as MonthName
UNION
SELECT Month(GETDATE()) - 9 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-9,-9)) as MonthName
UNION
SELECT Month(GETDATE()) - 10 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-10,-10)) as MonthName
UNION
SELECT Month(GETDATE()) - 11 as MonthNum
,datename(mm,DateAdd(mm,Month(GETDATE())-11,-11)) as MonthName
ORDER BY MonthNum DESC