Posts

Showing posts from January, 2013
collection list in c# http://www.dotnetperls.com/list
Multirow inserts INSERT INTO tablesname (col1,clo2) VALUES ( 'data1' , 'data2' ) , ( 'data3' , 'data4' ) ;  
insert, update ,delete multiple rows using c# and sql at once with the help of list and function  ANS. 1. Create function:- CREATE FUNCTION [dbo].[udf_CsvToInt] ( @Array VARCHAR(max) ) RETURNS @IntTable TABLE (IntValue INT) AS BEGIN IF @Array <> '' BEGIN DECLARE @separator char(1) SET @separator = ',' DECLARE @separator_position INT DECLARE @array_value VARCHAR(2000) SET @array = @array + ',' WHILE patindex('%,%' , @array) <> 0 BEGIN SELECT @separator_position = patindex('%,%' , @array) SELECT @array_value = LEFT(@array, @separator_position - 1) INSERT @IntTable Values (CAST(@array_value AS INT)) SELECT @array = stuff(@array, 1, @separator_position, '') END END RETURN end 2.update example ALTER PROC spUpdateTable @strID varchar(100) AS    UPDATE tablename     SET IsActive = 1     WHERE tableID in (select * from dbo.udf_CsvToInt(@strID) ) 3. C# button Click event   protected void btnTagIndexPage_Click(object sender, EventArgs e
Search table name used in stored procedures SELECT DISTINCT so.name, so.xtype FROM syscomments sc INNER JOIN sysobjects so ON sc.id=so.id WHERE sc.TEXT LIKE '%udf_CsvToInt%'
Get Question Paper Previous Years University Question Papers http://www.indiastudychannel.com/question-papers/
asp.net interview material http://soft-engineering.blogspot.in/p/aspnet.html http://www.a2zinterviews.com/DotNet/asp.net/ http://steptodotnet.blogspot.in/2012/07/dot-net-interview-questions-for-2.html http://www.aspdotnet-suresh.com/2010/05/interview-questions-in-aspnetcnetsql.html