Coderock

--------------------------------
link hover image

Visual Studio hot keys change occasionally, specifically F6 vs Ctrl-Shift-B for building

Frontpage calendar image January 9, 2016

You can reassign SHIFT + F6 to build the current project only: 1/ Go to Tools -> Options -> Environment -> Keyboard 2/ Show commands containing: Build.BuildSelection 3/ Focus the field Press shortcut keys & press Shift + F6 to assign it

link hover image

Crystal Reports: Formula editor window disappears

Frontpage calendar image January 7, 2016

If you are using a dual monitor or changing your monitor resolution, it is possible to ‘lose’ your Formula Editor. For Version 12, close Crystal Reports first and then follow these steps: Click the Start button and select “RUN” Type “Regedit” and Click “OK” Find the Registry key: HKEY_CURRENT_USERSoftwareBusiness ObjectsSuite 12.0 Crystal ReportsFormula Workshop Change […]

link hover image

How to Change Your WordPress Blog Password Using phpMyAdmin

Frontpage calendar image January 7, 2016

How to Change Your WordPress Blog Password Using phpMyAdmin:

link hover image

SQL: get previous from max value

Frontpage calendar image November 29, 2015

select max(card_no),vehicle_number FROM WBG.WBG_01_01 where card_no < (Select max(card_no) from WBG.WBG_01_01 group by vehicle_number) group by vehicle_number Source: stackoverflow

link hover image

SQL : Remove Special Characters except Space.

Frontpage calendar image November 14, 2015

DECLARE @str VARCHAR(400) –Add your specialcharacters here DECLARE @specialchars VARCHAR(50) = ‘%[~,@,#,$,%,&,*,(,),.,!^?:]%’ SET @str = ‘KRA!NTHI@#KUMAR, KU%^?MAR GO~()$U.:D’ WHILE PATINDEX( @specialchars, @str ) > 0 —Remove special characters using Replace function SET @str = Replace(REPLACE( @str, SUBSTRING( @str, PATINDEX( @specialchars, @str ), 1 ),”),’-‘,’ ‘) SELECT @str   Source: www.sqlservercentral.com

link hover image

How to export all data from table to an insertable sql format?

Frontpage calendar image November 10, 2015

Quick and Easy way: Right click database Point to tasks Select generate scripts Click next Choose tables Click next Click advanced Scroll to data to script – Called types of data to script in SMSS 2014 Select data only Click next and generate your script Source: stackoverflow

link hover image

The data type of substitution parameter 1 does not match the expected type of the format specification

Frontpage calendar image July 13, 2015

RAISERROR(‘Test Error Number: %d.’,16,1,@MyNumber) When the trigger is executed with the value 1 passed in the @MyNumber parameter, the result is: Msg 2786, Level 16, State 1, trigger trg_delete, Line 19 The data type of substitution parameter 1 does not match the expected type of the format specification. If the datatype for @MyNumber is changed to […]

link hover image

Error:”Index was outside the bounds of the array”

Frontpage calendar image May 24, 2015

I had a problem with “SQL Server Freetext and Contains functions at Godaddy webhosting”. Solution: I upgraded my SqlServer management studio from 2008 to 2012 Or Download the service packs of SqlServer Management Studio and update probably resolve you solution. This solved the prblem. Source: stackoverflow

link hover image

How to get width and height of an image from remote server in asp.net

Frontpage calendar image January 3, 2015

How to get width and height of an image from remote server in asp.net: I am using asp.net 3.5 with c#. I have hosted a site and I want to get width and height of an image from remote server. To avoid error URI formats are not supported, my code look like this: string filePath = string.Format(“http://yoursite.com/Item/{0}”, […]

link hover image

How to remove special characters from string

Frontpage calendar image January 2, 2015

How to remove special characters from string: string str1=Regex.Replace(txtDescription.Text,@”[[]\^$.|?*+(){}%,;><!@#&-+]”,””);