Posts

Showing posts from 2013

How can i disable autocorrect function on Windows Phone 7.5

Hello Guys,                lots of time when i am chatting with my friends, then m using some Hindi words but auto-complete function replace some words with English words. so i was very disappoint with the facilities . so now m going to telling you how can you solved this problem. just go into your setting>>Keyboard>>typing settings>>press to change>>uncheck Correct Misspelt words. i hope it'll be a very userfull for you...

C# - Generics

Generics allow you to delay the specification of the data type of programming elements in a class or a method, until it is actually used in the program. In other words, generics allow you to write a class or method that can work with any data type. You write the specifications for the class or the method, with substitute parameters for data types. When the compiler encounters a constructor for the class or a function call for the method, it generates code to handle the specific data type. A simple example would help understanding the concept: using System; using System.Collections.Generic; namespace GenericApplication {     public class MyGenericArray<T>     {         private T[] array;         public MyGenericArray(int size)         {             array = new T[size + 1];         }         public T getItem(int index)         {             return array[index];         }         public void setItem(int index, T value)         {             array[index] = valu

Design Tip #107 Using the SQL MERGE Statement for Slowly Changing Dimension Processing

Most ETL tools provide some functionality for handling slowly changing dimensions. Every so often, when the tool isn’t performing as needed, the ETL developer will use the database to identify new and changed rows, and apply the appropriate inserts and updates. I’ve shown examples of this code in the Data Warehouse Lifecycle in Depth class using standard INSERT and UPDATE statements. A few months ago, my friend Stuart Ozer suggested the new MERGE command in SQL Server 2008 might be more efficient, both from a code and an execution perspective. His reference to a blog by Chad Boyd on MSSQLTips.com gave me some pointers on how it works. MERGE is a combination INSERT, UPDATE and DELETE that provides significant control over what happens in each clause. This example handles a simple customer dimension with two attributes: first name and last name. We are going to treat first name as a Type 1 and last name as a Type 2. Remember, Type 1 is where we handle a change in a dimension attribute

DNS Server is not responding on Windows 7

Image
When you try to connect to the Internet, the connection might fail when we run the Troubleshooter and you might get this error:   The device or resource (DNS server) is not responding. DNS Server is not responding In such a scenario, there are few things you could try to resolve it. 1.       First backup your Router settings and update the Firmware of your Router. Check the Router manual for more information 2.       Next thing is to change the DNS server address manually. Go to Start and Click on Control Panel Open up Network and Internet and go to the Network and Sharing Center. Click on Change adapter settings Now you’ll see the list of Network adapters select the Network adapter  that your using and right click on it and go to properties Then Click on “Internet Protocol Version 4 (TCP/IPv4)” You’ll see the Internet Protocol Properties Select “Use the Following DNS server address:” Enter the Preferred DNS address:   208.67.222.22

How to find the table name in the database that have triggers

SELECT DISTINCT o.[name] AS [Table] FROM [sysobjects] o JOIN [sysobjects] tr ON o.[id] = tr.[parent_obj] WHERE tr.[type] = 'tr' ORDER BY [Table] If you want to know all name of the triggers then run the query select * from sys.triggers hope it'll helpfull

An example of Arrays,ArrayList,generic collections in an ASP.Net application !!!

In one of my ASP.Net seminars I have been asked to provide a small sample/example on working with a group of custom objects. I have created a small example/site with ASP.Net & C# and  thought it might be a good idea to share it with you. More specifically I have been asked to create a small ASP.Net web site where I will demonstrate the use of arrays with objects,ArrayLists with objects and generic collections with objects. I know some people will find this post's contents pretty basic but for those junior developers out there, I hope it is really helpful. Let's demonstrate that using our usual methodology, a hands-on step by step example. We will start with an array of objects first. 1) Launch Visual Studio 2010/2008/2005. Express editions work fine. 2) Create a new empty website and give it an appropriate name.Choose C# as the development language. 3)  Add a new item in your site, a web form item. Leave the default name, so it is calledDefault.aspx. 4) Add a ne

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered

If you run below SQL statement --------------------------------------------------------- Select * into DBTable FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\myExcelFile.xlsx;HDR=YES', 'SELECT * FROM [Sheet1$]') INSERT INTO DBTable select * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\myExcelFile.xlsx;HDR=YES', 'SELECT * FROM [Sheet1$]') and you get an error message like below The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered Solution you need to download  "Data Connectivity Components for 2007 office system Driver". after you download, please restart your server. you can  click link here to download from microsoft site .

sqlhelper.cs source code..

using System; using System.Data; using System.Xml; using System.Data.SqlClient; using System.Collections; namespace Microsoft.ApplicationBlocks.Data {     /// <summary>     /// The SqlHelper class is intended to encapsulate high performance, scalable best practices for     /// common uses of SqlClient.     /// </summary>     public sealed class SqlHelper     {         #region private utility methods & constructors         //Since this class provides only static methods, make the default constructor private to prevent         //instances from being created with "new SqlHelper()".         private SqlHelper() { }         /// <summary>         /// This method is used to attach array of SqlParameters to a SqlCommand.         ///         /// This method will assign a value of DbNull to any parameter with a direction of         /// InputOutput and a value of null.         ///         /// This behavior will prevent default values f