Posts

Remove Line Breaks SQL

To remove these SQL line breaks, use the SQL Server replace function. Indeed, the CHAR(13) and CHAR(10) specific codes represent the characters of the line breaks,and then replace them with a space or a comma, for example. This time, the copy paste gives us this result. REPLACE( I.DelAddress ,CHAR(13)+CHAR(10),' ')

Find Specific Text on Stored Procedure

Image
Do you remember we had so many requirements to check a text on stored procedures or a view? Think that we are going to change a field name of a table or a data type of a field. Or we are going to replace or delete a data table in your database. Database might be so big and there may be hundreds of stored procedures. We can't open every single stored procedures or a view and check whether they are using the data table we going to delete. For that, We can simply find the stored procedures which are using this particular data table or a field. That may help us to reduce the work load more than 80%. You can use this following query for it. SELECT     * FROM       INFORMATION_SCHEMA . ROUTINES WHERE      ROUTINE_DEFINITION LIKE '%TableName%'

Microsoft SharePoint 2010 Training Tutorial

Image
Microsoft SharePoint 2010 Training Tutorial  [Sites and Templates] Microsoft SharePoint 2010 Training Tutorial [Working with Wikis] Note :credits goes to original uploader

Apply CSS styles to SharePoint Web parts

Image
In SharePoint we are using various types of web parts. List View web part are one of major type which uses to populate data on the web page from a SharePoint list. By default all the web parts of the page use the styles inherits from the site theme. Here I explain a simple workout to apply a CSS style to a web part only using out of the box features of SharePoint 2010. There are only 3 steps for you to follow. 1. Get the ID of web part you wants to apply CSS style 2. Add Content Editor web part 3. Apply CSS style as you required Step 1 ♣ Go to “view source” of the browser you are using and search for the web parts name. In my scenario, it’s “Emergency”.   ♣ Now grab the ID number mentioned there at the end of WebPartTitleWPQ 2 . “2” is the ID of “Emergency” web part in my web page. Step 2 ♣ Now add a Content Editor Web Part by go to edit mode of the page. ♣ Set the Chrome Type as None of the added Content Editor Web Part. S...

SharePoint Number Column Without Commas

Image
Avoiding thousand separator(Comma) in SharePoint Number field SharePoint number fields having thousand separators(Comma) which may not want us to need every time. But there are no possibility to avoid the thousand separator(Comma) in the number fields.  To avoid this comma we can do a small workout as following.. Suppose our Number field named as "Student No." Create another Calculated column and name it as "Student Number" Then you have to type the formula according to the following format     = TEXT( Number_Column_Name, "0") And click Save In our scenario it will show as =TEXT([Student No],"0") Note : If the Student No field will empty, the value will be shown as "0".... Or if you want to keep it blank you have to adjust the formula as   =IF( [Student No] <>"",TEXT( [Student No] ,"0"),"") 

Create SharePoint New Site in FOUR steps

Image
Step One :  Go to the SharePoint site collection you want to create the new site. And click Site Action button to drop down the Site Action menu. The select New Site in Site Action menu Step Two : Select the type of the site template you want to create. Team Site template is the most popular template among those Step Three :  Enter the Title of the site you are going to create and the URL of it        (If you are planning to manage the permission uniquely, click More Option rather than Create ) Step Four : Enter the Site Title and the URL you are going to create. Then select Use unique permission to introduce a different permission structure which not use in the parent site of this newly creating site Click Create button to create the new site.   That's ALL......!

Raising a Button Click event programmatically

Image
When developing windows (C#) forms, as developers we are very much concerning about speedup data entering of users. Minimizing use of mouse, use of tab key to move courser from one text box to another, etc. are main methods can increase data entering speed. Other than that use shortcut key for button operations is also speed up the data entering. As an example thinks that we can assign F2 key for data saving and F3 for deleting addition to having Save and Delete buttons. According to our common practice we are write the code to save the record under button click event of “Save” button. private void btnSave_Click( object sender, EventArgs e) { //The code goes here } private void btnEdit_Click( object sender, EventArgs e) { //The code goes here } To execute same method for F2 key press event, we have to override inherited method of the form which called ProcessDialogKey. Parameters keyData One of the  Keys  values that repr...