Posts

Showing posts from April, 2013

Insert multiple rows in one statement in SQL Server 2008

Row Constructor is new feature to SQL Server 2008 that allows insertion of multiple rows of data at once. Say we create a table row_constructor create table row_construct ( ID int identity ( 1 , 1 ) not null primary key , type varchar ( 20 ) not null default 'N/A' , name varchar ( 100 ) not null default 'N/A' ) insert row_construct ( type , name ) values ( 'A' , 'Garments' ) insert row_construct ( type , name ) values ( 'B' , 'Sports Equipments' ) insert row_construct ( type , name ) values ( 'C' , 'Cosmetics' ) insert row_construct ( type , name ) values ( 'A' , 'Swim Wears' ) insert row_construct ( type , name ) values ( 'A' , 'Sports Garments' ) --but with the help of row constructors we can insert the same data using single insert statement as below insert row_construct ( type , name ) values ( 'A' , 'Garments' ),( 'B

System.Net.WebException: The operation has timed-out in WebService

Actual Error : {System.Net.WebException: The operation has timed out    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) Inner Exception :   Everytime inner exception will not be same.So you have check it while debugging. Solution: If it possible to modify timeout session timing in web_service increase it. From CS Code:  Service1 ws = new Service1();  ws.Timeout = 300000;  ws.HelloWorld(); Check the solution. Enjoy :) :) :)