Skip to main content

Posts

Showing posts from 2016

SQL SERVER – Cannot resolve collation conflict for equal to operation

Dear All, In MS SQL SERVER, the collation can be set at the column level. When compared 2 different collation column in the query, this error comes up. SELECT ID FROM ItemsTable INNER JOIN AccountsTable WHERE ItemsTable.Collation1Col = AccountsTable.Collation2Col If columns ItemsTable.Collation1Col and AccountsTable.Collation2Col have different collation, it will generate the error “Cannot resolve collation conflict for equal to operation“. To resolve the collation conflict add following keywords around “=” operator. SELECT ID FROM ItemsTable INNER JOIN AccountsTable WHERE ItemsTable.Collation1Col COLLATE DATABASE_DEFAULT = AccountsTable.Collation2Col COLLATE DATABASE_DEFAULT I hope the above solution will help you and save your time  Regards  Rashid Imran Bilgrami 

RegisterStartupScript updated way to right Java script JS (Javascript) in code behind also work with update panel

Dear All RegisterStartupScript is obsolete now the new way that works with update panel  is given below its is code behind file code also VB Code Dim csname1 As String = "PopupScript" Dim cstype As Type = Me.GetType() Dim cs As ClientScriptManager = Page.ClientScript Dim cstext1 As String = "alert('Your message');" cs.RegisterStartupScript(cstype, csname1, cstext1, True) C# Code String csname1 = "PopupScript"; Type cstype = this.GetType(); ClientScriptManager cs = Page.ClientScript; String cstext1 = "alert('Hello World');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); I hope it will help you also  Regards  Rashid Imran Bilgrami

How to Create Window Service and execute it

Dear All If you are looking for develop you own window service than below is the simplest method to create it The original reference for this post is following http://www.c-sharpcorner.com/UploadFile/naresh.avari/develop-and-install-a-windows-service-in-C-Sharp/ Here we go... This article explains a step-by-step process of developing and installing a Windows Service to do a scheduled job based on a time interval. Open Visual Studio and from the menus select "File" -> "New" -> "Project...". A New Project window will open. Choose "Visual C#" >> "Windows" project type and select "Windows Service" from the right hand side and name the project "TestWindowsService" as shown in the following screenshot. After you click "OK", the project will be created and you will see the design view of the service as shown in the following screen. Right-click the "Service1.cs" file in S...

SEND SMS or Call HttpWebRequest on Proxy Server or ISA Server

Dear All  I tried to access the HttpWebRequest to send the SMS the code was working fine with my online website but when i run it with my local server and the LAN server i got and server not responding error Original Solution Post  http://stackoverflow.com/questions/20336826/httpwebrequest-cannot-connect-through-proxy A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IP Address:80 Description:  An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:  System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IP ADDRESS:80 Aft...

Mobile APP development with Visual studio.net 2015

Dear All This is an awesome video for the one VS application tool for development the code of all mobile devices  I hope it will work for you Regards Rashid Imran Bilgrami

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

Dear All, Once i got the issue for the timeout i fixed the following in the code " Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated" Its a vb code you can use it in C# also  Dim ObjCon As New SqlConnection ObjCon.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("conString").ConnectionString  ObjCon.Open()  ObjCmd.Connection = ObjCon  ObjCmd.CommandText = "Select * from your table" ' Its a trick only   ObjCmd.CommandTimeout = 0 Try                     ObjDr = ObjCmd.ExecuteReader                 Catch ex As Exception                     Response.Write("Following Error is there:" & ex.ToString() & "Kindly contact with IT Department")           ...

How to Get All SQL Tables

Dear All, If you want to get all SQL tables through query use the following command SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' order by table_name I hope it save your time Regards Rashid Bilgrami