Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

Archive for February, 2012

SPACE() function of SQL Server

Posted by Viral Sarvaiya on February 16, 2012


Usually when we concatenate two fields like firstname and lastname we use ‘ ‘ between them like below

select firstname + ' ' + lastname from tblEmployee

And if we want more space then we use long space between them, but sql server provide function for print space between query.

Syntax:
SPACE(NO)

For example

select firstname + SPACE(2) + lastname from tblEmployee

It will return like below.

Viral  Sarvaiya

Thanks.

Enjoy..

Posted in Sql Server | Tagged: , , , , | Leave a Comment »

The “CreateRiaClientFilesTask” task failed unexpectedly

Posted by Viral Sarvaiya on February 14, 2012


Some day ago, when i build my project i get unexpected error.

Error 3 The “CreateRiaClientFilesTask” task failed unexpectedly.
System.Web.HttpException (0x80004005): Could not load file or assembly ‘FileHelpers.DataLink’ or one of its dependencies. Access is denied. —> System.Configuration.ConfigurationErrorsException: Could not load file or assembly ‘FileHelpers.DataLink’ or one of its dependencies. Access is denied. —> System.IO.FileLoadException: Could not load file or assembly ‘FileHelpers.DataLink’ or one of its dependencies. Access is denied……….

Sometime that happen when Visual studio cannot access files. so have to remove Temporary file.

I get simple solution from goggling, just close visual studio and reopen, and if Visual studio has no administrator rights then please right click to visual studio icon and choose “Run as a Administrator”.

Then re-build project and problem solved.

Thanks.

Posted in .Net, ASP.NET, RIA WCF, Silverlight, Visual Studio, WCF Services, WPF | Tagged: , , , , , | 4 Comments »

 
%d bloggers like this: