Thursday, 4 April 2013

Insert Records in SQL Using XML


/**************************************************************************************************                                                                                                    
PURPOSE     : TO GET PAYROLL DATA INFORMATION                                          
RETURNS     : NILL                                                                                                
ARGUMENTS   :                                  
usp_SetPayRollData_XML    @Resxml='<NewDataSet>                              
<Table1>                              
<Column1>HOVNV0004</Column1>                              
<Column2>ALtergame</Column2>                              
<Column3>100001</Column3>                              
</Table1>                              
</NewDataSet>',@Month=12,@year=2012,@locationId=3                                    
CREATED BY  : Venkat                                        
----------------------------------------------------------------------------------------------------------------------                                                                                                
MODIFICATION LOG                                                                                                
----------------------------------------------------------------------------------------------------------------------                                                                                                
TRACK ID     MODIFIED BY          MODIFIED DATE    REASON                                                                                                
----------------------------------------------------------------------------------------------------------------------                                                            
**********************************************************************************************************************/                                              
CREATE PROCEDURE usp_SetPayRollData_XML                                        
(                                    
@Resxml XML,                                      
@LocationID BIGINT=NULL,                                          
@User VARCHAR(30)=NULL,                                        
@CreatedON DATETIME=NULL,                                          
@CreatedIP VARCHAR(15)=NULL,                                        
@Month Char(2)=NuLL,                                  
@Year Char(4)=NuLL                                  
         
)                                    
         
AS                                        
         
BEGIN                                        
 BEGIN  TRY                                
   SET NOCOUNT ON    
       
 CREATE TABLE [dbo].[#Resxmloutput](    
  [LocationID] [bigint]  NULL,    
  [EmpID] [nvarchar](50) NULL,    
  [Year] [smallint]  NULL,    
  [Month] [tinyint]  NULL,    
  [Empname] [varchar](100) NULL,    
  [Salary] [nvarchar](Max) NULL,    
  [CreatedBy] [varchar](30) NULL,    
  [CreatedOn] [datetime] NULL,    
  [CreatedIP] [varchar](15) NULL,    
  [ModifiedBy] [varchar](30) NULL,    
  [ModifiedOn] [datetime] NULL,    
  [ModifiedIP] [varchar](15) NULL)    
       
     
  Insert into   [#Resxmloutput] (                            
  EmpID,                                  
  [Empname],                                  
  Salary)                                          
  SELECT Distinct                                                      
  xmlVals.rowvals.query('Column1').value('.','VARCHAR(30)') as EmpID,                                                        
  xmlVals.rowvals.query('Column2').value('.','VARCHAR(30)') as EmpName,                                    
  xmlVals.rowvals.query('Column3').value('.','NVARCHAR(MAX)') as Salary                                                        
  FROM                                                      
  @Resxml.nodes('/NewDataSet/Table1') as xmlVals(rowvals)    
       
  Update #Resxmloutput Set Month =@Month ,Year =@year ,LocationID =NULL    
       
  /* To Find out the Emprty Recs in the XML*/                
  Select 'No of Empty Records in the CSV File : ' + Cast(Count(*) AS Varchar)                                  
  From #Resxmloutput Where EmpID = '' OR Salary = '' OR EmpName = ''                                        
             
  Select   'No of Repeated Records in the CSV File : ' +                
  Cast(Count(Distinct r1.EmpID)AS Varchar)+';' + ' '                
  + 'EmpID : ' From #Resxmloutput r1 Join #Resxmloutput r2                
  ON r1.EmpID =r2.EmpId and  (r1.EmpName != r2.EmpName OR r1.Salary != r2.Salary)                  
  Union ALL                
  Select Distinct(r1.EmpID)+ ' '+','   From #Resxmloutput r1 Join #Resxmloutput r2                
  ON r1.EmpID =r2.EmpId and  (r1.EmpName != r2.EmpName OR r1.Salary != r2.Salary)                  
  FOR XML PATH('')                
         
  /* To Delete the Duplicate Recs in the XML*/                
  Delete r1   From #Resxmloutput r1 Join #Resxmloutput r2                
  ON r1.EmpID =r2.EmpId and  (r1.EmpName != r2.EmpName OR r1.Salary != r2.Salary)                
       
           
  --/* To find The UnMapped Employyes in Non-licm*/        
  --Select 'No of Employees Not Mapped in Non-LICM  : '                  
  --+Cast(Count(*) AS Varchar) + ' '  +';' + 'EmpID :' From #Resxmloutput tr                  
  --Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''                
  --And tr.EmpId Not in      
  --(Select EmpId From V_CM_M_EmpMaster    
  --Union      
  --Select User_id From V_empMaster_all)      
  --Union ALL                  
  --Select Distinct(tr.Empid) + ','  From #Resxmloutput tr                
  --Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''                
  --And tr.EmpId Not in    
  --(Select EmpId From V_CM_M_EmpMaster    
  --Union      
  --Select User_id From V_empMaster_all)      
  --For XML Path('')          
       
       
         
  --/* To find The UnMapped Employees in Licm*/        
  --Select 'No of Employees Not Mapped in LICM and Non-Licm : '                  
  --+Cast(Count(*) AS Varchar) + ' '  +';' + 'EmpID :' From #Resxmloutput tr                
  -- Where tr.Empid  Not IN                
  --(Select User_ID FrOm V_EmpMaster_all    
  --Union      
  --Select EmpId From v_CM_M_EmpMaster)    
  --and EmpID <> '' AND Salary <> '' AND EmpName <> ''                  
  --Union ALL                  
  --Select Distinct(tr.Empid) + ','  From #Resxmloutput tr                
  --Where tr.Empid  Not IN                
  --(Select User_ID FrOm V_EmpMaster_all    
  --Union      
  --Select EmpId From v_CM_M_EmpMaster)    
  --and EmpID <> '' AND Salary <> '' AND EmpName <> ''                  
  --For XML Path('')            
       
  /* To find The UnMapped Employyes in Non-licm*/        
  Select 'No of Employees Not Mapped in Non-LICM/LICM : '                  
  +Cast(Count(*) AS Varchar) + ' '  +';' + 'EmpID :' From #Resxmloutput tr      
  Left Join V_empMaster_all Ve                    
  ON Ve.User_ID = tr.EmpID      
  Left Join V_Cm_M_EmpMaster Vc                    
  ON Vc.EmpID = tr.EmpID      
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''      
  AND Ve.USER_ID IS NULL  AND Vc.EmpID IS NULL                  
  Union ALL                  
  Select Distinct(tr.Empid) + ','  From #Resxmloutput tr                
  Left Join V_empMaster_all Ve                    
  ON Ve.User_ID = tr.EmpID      
  Left Join V_Cm_M_EmpMaster Vc                    
  ON Vc.EmpID = tr.EmpID      
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''      
  AND Ve.USER_ID IS NULL  AND Vc.EmpID IS NULL              
  For XML Path('')          
       
                     
         
         
         
  /* To find The UnMapped Employyes Location*/        
  Select 'No of Employees Location Not Mapped in Non-LICM  : '                  
  +Cast(Count(*) AS Varchar) + ' '  +';' + 'EmpID :' From #Resxmloutput tr                
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                            
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''                
  AND Ve.SiteID Not IN                
  (Select SiteID FrOm V_CM_M_Site)                  
  Union ALL                  
  Select Distinct(tr.Empid) + ','  From #Resxmloutput tr                
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                                
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''                
  AND Ve.SiteID Not IN                
  (Select SiteID FrOm V_CM_M_Site)            
  For XML Path('')                
       
     
         
  /* To find The UnMapped Employres Location*/        
  Select 'No of Employees Location Not Mapped in LICM : '                  
  +Cast(Count(*) AS Varchar) + ' '  +';' + 'EmpID :' From #Resxmloutput tr                
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Where EmpID <> '' AND Salary <> '' AND EmpName <> ''                
  AND Ve.Location_ID Not IN                
  (Select Loc_ID FrOm V_locationMaster)                  
  Union ALL                  
  Select Distinct(tr.Empid) + ','  From #Resxmloutput tr                
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Where EmpID <> '' AND Salary <> '' AND EmpName <> ''                
  AND Ve.Location_ID Not IN                
  (Select Loc_ID FrOm V_locationMaster)                  
  For XML Path('')                  
       
 CREATE TABLE [dbo].[#ResxmlLicl](    
  [LocationID] [bigint] NOT NULL,    
  [EmpID] [nvarchar](50) NOT NULL,    
  [Year] [smallint] NOT NULL,    
  [Month] [tinyint] NOT NULL,    
  [Empname] [varchar](100) NULL,    
  [Salary] [nvarchar](Max) NULL,    
  [CreatedBy] [varchar](30) NULL,    
  [CreatedOn] [datetime] NULL,    
  [CreatedIP] [varchar](15) NULL,    
  [ModifiedBy] [varchar](30) NULL,    
  [ModifiedOn] [datetime] NULL,    
  [ModifiedIP] [varchar](15) NULL,    
  CONSTRAINT [PK_#ResxmlLicl] PRIMARY KEY CLUSTERED      
 (    
  [EmpID] ASC,    
  [Year] ASC,    
  [Month] ASC,    
  [LocationID] ASC    
 )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]    
 ) ON [PRIMARY]          
     
  /* To get Location from the LICL*/                
       
       
       
  Insert Into #ResxmlLicl(    
   EmpID,                                
  [Month],                                
  [Year],                                
  EmpName,                                
  [Salary],                                
  [LocationID],                
  [CreatedBy],                      
  [CreatedIP],                
  [CreatedON])                                    
       
  Select Distinct                            
  EmpID,                                
  [Month],                                
  [Year],                                
  EmpName,                                
  [Salary],                                
  Ml.SeqID[LocationID],                
  @User,                      
  @CreatedIP,                        
  Getdate()[CreatedOn] From #Resxmloutput tr                              
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Join V_LocationMaster Vl                                
  ON Vl.Loc_ID = Ve.Location_ID                                
  Join M_location Ml                              
  ON Ml.[System]= 'FF' And Ml.Country='India'                                      
  And Vl.Loc_City = Ml.LocationName                  
  Where EmpID <> '' AND Salary <> '' AND EmpName <> ''                        
       
  /*To Updte the T_paydata Table When XML And T_Payadata are same*/                
  Update  tp1  Set tp1.Salary = tr.Salary ,                                    
  tp1.EmpName = tr.EmpName,                
  tp1.ModifiedON =Getdate(),                
  tp1.ModifiedBy = @user ,            
  tp1.ModifiedIP  =@CreatedIP              
  From #ResxmlLicl tr                                  
  Join T_paydata tp1                                  
  ON tr.LocationID = tp1.LOCATIONID AND                                        
  tr.EmpID = tp1.DomainID                                    
  AND tr.[Year] = tp1.Payyear                                    
  AND tr.[Month] = tp1.PayMonth                                  
         
  /*To Get the Count How Many Recs Inserted Sucessfully*/                  
  Select 'Total Records Inserted successfully For Licm Employees : '+ ' '          
  +Cast(Count(*) AS Varchar) From #ResxmlLicl tr                              
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Join V_LocationMaster Vl                                
  ON Vl.Loc_ID = Ve.Location_ID                                
  Join M_location Ml                              
  ON Ml.[System]= 'FF' And Ml.Country='India'                                            
  And Vl.Loc_City = Ml.LocationName                  
  Where EmpID <> '' AND Salary <> '' AND EmpName <> ''                  
         
  /*After Update the data in T_paydata Table Delete it from Xml Data*/                    
  Delete  tr  From T_paydata tp1                                  
  Join #ResxmlLicl tr                                
  ON tr.LocationID = tp1.LOCATIONID AND                                        
  tr.EmpID = tp1.DomainID                                    
  AND tr.[Year] = tp1.Payyear                                    
  AND tr.[Month] = tp1.PayMonth                    
       
  /* To Insert the Records in T_paydata Table*/                  
  Insert Into T_paydata                                
  (LocationID,                                  
  DomainID,                                
  PayMonth,                                
  PayYear,                                
  Empname,                                
  Salary,                                
  CreatedBy,              
  CreatedIP,                                
  CreatedOn)                                
         
  (Select Distinct Ml.SeqID,                                
  EmpID,                    
  [Month],                                
  [Year],                                
  EmpName,                                
  [Salary],                                
  [CreatedBy],                
  CreatedIP,                        
  Getdate() From #ResxmlLicl tr                              
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Join V_LocationMaster Vl                                
  ON Vl.Loc_ID = Ve.Location_ID                                
  Join M_location Ml                              
  ON Ml.[System]= 'FF' And Ml.Country='India'                                            
  And Vl.Loc_City = Ml.LocationName                  
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> '')                                  
         
  Delete tr From #ResxmlLicl tr                                
  Join v_empMaster_all Ve ON                              
  ve.[User_ID] = tr.EmpID                              
  Join V_LocationMaster Vl                                
  ON Vl.Loc_ID = Ve.Location_ID                                
  Join M_location Ml                              
  ON Ml.[System]= 'FF' And Ml.Country='India'                                            
  And Vl.Loc_City = Ml.LocationName                  
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''      
         
  /*To check if any  data is available in the xml*/          
         
         
  If Exists(Select Top 1 EmpID From #Resxmloutput)      
         
  Begin      
           
  /* To get Location from the LICL*/                
  Select * into #ResxmlNonLicm From(                                  
  Select Distinct                            
  tr.EmpID,                                
  [Month],                              
  [Year],                                
  EmpName,                                
  [Salary],                                
  Ml.SeqID[LocationID],                
  @User[CreatedBy],                      
  @CreatedIP[CreatedIP],                          
  Getdate()[CreatedOn] From #Resxmloutput tr                              
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                              
  Join V_CM_M_Site Vl                                
  ON Vl.SiteID = Ve.SiteID        
  Join M_location Ml                              
  ON Ml.[System]= 'FF'        
  And Vl.SiteName = Ml.LocationName          
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> '')A                        
         
         
  /*To Updte the T_paydata Table When XML And T_Payadata are same*/                
  Update  tp1  Set tp1.Salary = tr.Salary ,                                    
  tp1.EmpName = tr.EmpName,                
  tp1.ModifiedON =Getdate(),                
  tp1.ModifiedBy = @user ,              
  tp1.ModifiedIP  =@CreatedIP              
  From #ResxmlNonLicm tr                                  
  Join T_paydata tp1                                  
  ON tr.LocationID = tp1.LOCATIONID AND                                        
  tr.EmpID = tp1.DomainID                                    
  AND tr.[Year] = tp1.Payyear                                    
  AND tr.[Month] = tp1.PayMonth                                  
         
  /*To Get th Count How Many Recs Inserted Sucessfully*/                  
  Select 'Total Records Inserted successfully For Non-Licm Employees : '+ ' '          
  +Cast(Count(*) AS Varchar) From #ResxmlNonLicm tr                              
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                              
  Join V_CM_M_Site Vl                                
  ON Vl.SiteID = Ve.SiteID        
  Join M_location Ml                              
  ON Ml.[System]= 'FF'                                            
  And Vl.SiteName = Ml.LocationName                  
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''                  
         
  /*After Update the data in T_paydata Table Delete it from Xml Data*/                    
  Delete  tr  From T_paydata tp1                                  
  Join #ResxmlNonLicm tr                                
  ON tr.LocationID = tp1.LOCATIONID AND                                        
  tr.EmpID = tp1.DomainID                                    
  AND tr.[Year] = tp1.Payyear                                    
  AND tr.[Month] = tp1.PayMonth                                                
         
  /* To Insert the Records in T_paydata Table*/                  
  Insert Into T_paydata                                
  (LocationID,                                  
  DomainID,                                
  PayMonth,                                
  PayYear,                                
  Empname,                                
  Salary,                                
  CreatedBy,              
  CreatedIP,                                
  CreatedOn)                                
         
  (Select Distinct Ml.SeqID,      
  tr.EmpID,                    
  [Month],                                
  [Year],                                
  EmpName,                                
  [Salary],                                
  tr.CreatedBy,              
  tr.CreatedIP,                                
  Getdate() From #ResxmlNonLicm tr                              
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                              
  Join V_CM_M_Site Vl                                
  ON Vl.SiteID = Ve.SiteID        
  Join M_location Ml                              
  ON Ml.[System]= 'FF'                                          
  And Vl.SiteName = Ml.LocationName                      
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> '')          
         
         
  Delete tr From #ResxmlNonLicm tr                              
  Join V_CM_M_EmpMaster Ve ON                              
  ve.EmpID = tr.EmpID                              
  Join V_CM_M_Site Vl                                
  ON Vl.SiteID = Ve.SiteID        
  Join M_location Ml                              
  ON Ml.[System]= 'FF'                                          
  And Vl.SiteName = Ml.LocationName                      
  Where tr.EmpID <> '' AND tr.Salary <> '' AND tr.EmpName <> ''      
         
   End        
         
END TRY                                    
BEGIN CATCH                                    
SELECT  ERROR_MESSAGE()                                  
END CATCH                                    
         
         
   SET NOCOUNT OFF      
         
END

Find Set Of Text and substring it in SQL

Declare @Test AS Varchar(60)
Declare @Test1 AS Varchar(60)
SET @Test =  'This is used to find and replace This'
Select  PATINDEX('%i%',@Test)


Important Websites From Venkat


Bookmarks

ASP.Net

Articles « Abhijit's World of .url
asp.net - Storing multiple values in cookies - Stack Overflow.url
ASP.NET GridView Sorting with Image.url
Boost ASP.NET Performance with Precompilation  Page 2.url
Dot Net Developer - .Net Developer - Sample Resume - CV.url
error Cache Access Denied.url
Install .NET Framework 1.1 on Windows NT 4.0 Server.url
lava what is different between BCL (Base Class Library) and FCL (Framework Class Library) in Microsoft dot net (.url

C#

.net - C# - How does CLR organize memory-reference during the inheritance - Stack Overflow.url
All About Assemblies - CodeProject.url
ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,SSRS, XML examples.url
c# - Assigning derived class object to a parent class reference - Stack Overflow.url
Explicit Conversion of Base Class to Derived Class.url
Global Assembly Cache (GAC) - Sharper Tutorials.url

IIS

Beginner's Guide Exploring IIS 6.0 With ASP.NET - CodeProject (2).url
Beginner's Guide Exploring IIS 6.0 With ASP.NET - CodeProject.url
Internet Information Services 6 Tutorial (Windows Server 2003).url

JQuery

jQuery Tablesorter don't sort columns if has class - Stack Overflow.url
jQuery UI Multiple Select Widget Eric Hynds.url

SQL

Code to find out the query that caused the trigger to fire, for auditing Narayana Vyas Kondreddi's homepage.url
Difference Between Sql Server VARCHAR and NVARCHAR Data Type « BeginSQL.url
February « 2010 « SQL Server Journey with SQL Authority.url
http--blog.sqlauthority.url
SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 3 of 31 « SQL Server Journey with SQL Authority.url

aboutblank.url
Clustered and Non-Clustered Index in SQL 2005 - CodeProject (2).url
Clustered and Non-Clustered Index in SQL 2005 - CodeProject.url
Convert DOCX to DOC Online Free.url
Creating and Configuring FTP Sites in Windows Server 2003.url
Free File Converter Online file Converter Download File.url
How do i calculate the percentage difference between two numbers i suckkkk at math!!!! - Yahoo! Answers.url
http--india.smetoolkit.org-india-en-file-content-43677-en-SMEToolKit_QueryResolution_SoftwareFirm.url
http--www.cs.york.ac.uk-rts-books-CRTJbook-Lecture9.url
http--www.google.co.in-urlsa=t&rct=j&q=how+to+use+jquery+in+content+page&source=web&cd=6&ved=0CGgQFjAF&url=http%3A%2F%2Fapi.jquery.url
http--www.jqwidgets.url
http--www.ressign.com-images-spirituality-TheGayatriManthra7854.url
http--www.sdn.sap (2).url
http--www.sdn.sap.url
IND 240-5 in 47 Overs, Ravindra Jadeja 35, MS Dhoni 55 (2).url
IND 240-5 in 47 Overs, Ravindra Jadeja 35, MS Dhoni 55.url
Marshal's Light Prevent IIS Session Timeout in ASP (2).url
Marshal's Light Prevent IIS Session Timeout in ASP (3).url
Marshal's Light Prevent IIS Session Timeout in ASP (4).url
Marshal's Light Prevent IIS Session Timeout in ASP .url
Microsoft Events.url
Nonclustered Index Structures (2).url
Nonclustered Index Structures.url
Page Not Found.url
Paul White Page Free Space Temporary Tables in Stored Procedures.url
Silverlight.url
SQL Server database developer interview questions and answers TechRepublic.url
SQL Server Developer T-SQL Interview Questions.url
SQL Server Interview Questions and Answers - Page 2.url
SQL SERVER – Enable xp_cmdshell using sp_configure « SQL Server Journey with SQL Authority (2).url
SQL SERVER – Enable xp_cmdshell using sp_configure « SQL Server Journey with SQL Authority.url
SQL SERVER – Index Seek & Scan - saif-sqlserver-recipes (2).url
SQL SERVER – Index Seek & Scan - saif-sqlserver-recipes (3).url
SQL SERVER – Index Seek & Scan - saif-sqlserver-recipes (4).url
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index « SQL Server Journey with SQL Authority (2).url
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index « SQL Server Journey with SQL Authority (3).url
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index « SQL Server Journey with SQL Authority.url
SQL SERVER – Running Batch File Using T-SQL – xp_cmdshell bat file « SQL Server Journey with SQL Authority.url
SQL SERVER – Script to Find SQL Server on Network « SQL Server Journey with SQL Authority.url
SQL Tutorials SQL String Functions.url
Suggested Sites.url
T-SQL Remove Multiple Spaces from String - SQLUSA (2).url
T-SQL Remove Multiple Spaces from String - SQLUSA.url
Teratrax SQL Server Data Types and Ranges.url
Use ASP.NET 2.0 pre-compilation to avoid delays TechRepublic.url
ViewState and Readonly Property of Textbox - CodeProject.url
Web Slice Gallery.url
Web.url
Welcome to Capture - Online Monthly magazine! (3).url

Important Websites From Babu And Others


http://mycodelines.wordpress.com/category/concepts-explored/framework/

JQuery  - http://oscarotero.com/jquery/


Bookmarks

Bookmarks bar

Bank

IRCTC
IDBI
HDFC Bank Credit Card
Welcome to HDFC Bank Credit Card
Welcome to HDFC Bank Loan Account
EPF e-Passbook – Check Your Employee’s Provident Fund Balance Online
EPF Member Balance
EPF Member Portal
Enrolment Status
Tamilnadu Arasu Cable TV Online Payment
airtel Money Load Cash | Money Transfer | Easy Cash Load
Insurance

இன்சூரன்ஸ் பாலிசியை மேலும் பயனுள்ளதாக்குவது எப்படி? - Goodreturns Tamil
முதலீடு செய்யப் போறீங்களா? முதல்ல இதைப் படிங்க - Goodreturns Tamil
இந்த ஆண்டு நிதி பிரச்சனை இல்லா ஆண்டாக இருக்க வேண்டுமா? - Goodreturns Tamil
மொபைல் மூலம் பணம் பரிவர்த்தனையின் நன்மைகள் - Goodreturns Tamil
2013-ம் ஆண்டுக்கான சிறந்த முதலீட்டு திட்டங்கள் - Goodreturns Tamil
‘ரிலையன்ஸ் மை கோல்ட்’ திட்டம்: இப்போது தங்கத்தில் ஒரு நாளைக்கு ரூ. 50 சேமிக்கலாம்! - Goodreturns Tamil
வேலையை மாத்துறீங்களா? பி.எஃப் கணக்கை மூடிடாதீங்க! - Goodreturns Tamil
கிரெடிட் கார்டு பயன்படுத்துபவரா? மோசம் போகாமல் இருக்க இதைப் படிங்க - Goodreturns Tamil
குழந்தை காப்பீட்டு திட்டங்களால் பெற்றோருக்கு கிடைக்கும் பலன்கள் - Goodreturns Tamil
பங்கு வர்த்தக கணக்கு துவங்க என்னென்ன ஆவணங்கள் தேவை? - Goodreturns Tamil


Herbs

அற்புதம் விளைவிக்கும் அதிசய மூலிகைகள்
சிவகுமாரின் சித்தமருத்துவம்
kanavy.com / சித்த மருத்துவம்
Herbs with Images
சித்தர் பிரபஞ்சம்: நீர் மேல் நெருப்பு- (Neer mel neruppu) நோய்கள்-வறுமை -சத்துரு நீங்கி வளம் பெற
பெட்டகம்: புற்றுநோயைத் தடுக்கும் தூதுவளை --- மூலிகைகள் கீரைகள்
மூலிகைகள் பட்டியல் - தமிழ் விக்கிப்பீடியா
மூலிகை மருத்துவம் - மருத்துவத் தகவல்கள் - நிலாமுற்றம்
ஆயுர் வேதம் - http://jaffnamedical.com/
poongaa-பூங்கா: மருத்துவ மூலிகைகள்
மூலிகைவளம்
granny therapy,grannytherapy,patti vaithiyam,pattiyvaithiyam,kai vaithiyam,kai vaidyam,Paati kai vaithiyam,simple paati vaithiyam,siddha vaidyam,Tamil siddha vaidyam,Granny Medicine,Herbal Granny,Traditional Medicine,Alternative Medicine,Food medicine,Ind
ஆயுர்வேத மருத்துவம்
ஈகரை சித்த மருத்துவம்: துத்திக் கீரை - மூலநோய் போக்கும் மூலிகை
ஆண்களுக்கு மிகவும் இன்றியமையாத உணவுகள் @ Voice Of Mannar
Thamilan - விந்தணு உற்பத்தியை அதிகரிக்க..!
iron and calcium rich foods

Medicines

மருத்துவம்
மாலை மலர் | Maalaimalar Womens health care | Womens care | Womens Medical tamilnadu | Health News in Tamil | Women health tips Tamil | Women Safety tamil news
ஐநூறு வகை தமிழர் உணவுகள்! « சிறகு Siragu
உடல்நலம் « உங்களுக்காக
சித்தர் பிரபஞ்சம்: ஆண்மைக்குறைவு நீக்கும் கீரைகள் சித்த மருத்துவ பழமொழிகள் விளக்கம் -2
ஆரோக்கியம்
தமிழ் மருத்துவம்: சித்த மருத்துவத்தினால் முதுமையில் நிறைவாழ்வு
செக்ஸ் தெரபி - பாலியல் ஆலோசகர் பயிற்சி SEX THERAPY – BASIC COUNSELLING SKILLS | தமிழ் நண்பர்கள் Tamil Friends
நரம்புத் தளர்ச்சி -- சித்தர்களின் ரகசிய மருத்துவ முறை | தமிழ் நண்பர்கள் Tamil Friends
காமநோய்க்குக் கண்கண்ட மருந்து... | தமிழ் நண்பர்கள் Tamil Friends
சித்தர்கள் இராச்சியம்
இயற்கையின் படைப்புகள்: உங்களுக்கு இதை தெரியுமா ?-ஆண்மை பெருக்கும் வீட்டிலே உள்ள மூலிகைஉணவுகள்
Lifestyle | Beauty | Fashion Tips | Health | Kamasutra | லைப்ஸ்டைல் | அழகு குறிப்பு | உடல் நலம் ஆரோக்கியம் | காமசூத்ரா - Boldsky Tamil

Tools

Calendar
SQLinForm - Free Online Vesion
Instant SQL Formatter
Format CSS Online
Online JavaScript beautifier
Photo editor online / free image editing direct in your browser - Pixlr.com
Animated Gifs
Online Recharge - Prepaid Mobile Recharge | DTH Recharge | Data card Recharge - recharge.oneindia.in
Free SMS, Send Free SMS, Send Free SMS to india, Way2SMS Login, Free SMS Site, Free email alerts, email2SMS, SMS Alerts, send SMS to any Mobile, Mobile to Mobile free SMS

Blogs

சிறுகதைகள் | ……….இது உங்களுக்கான தளம்
(41) Flowers
Angel Waterfall of Venezuela - The World's Highest Waterfall | 360 Degree Aerial Panorama | 3D Virtual Tours Around the World | Photos of the Most Interesting Places on the Earth | AirPano.com
A Truth Soldier
Welcome to OnlineSBI - Personal Banking
இனிய ஓவியா
பி.எஃப் கணக்கு டிரான்ஸ்பர், பணம் எடுப்பது குறித்து ஆர்.டி.ஐ. மூலம் எப்படி அறியலாம்? - Goodreturns Tamil
Gold Rate In Chennai | Gold Rate Today | Chennai Gold Rate | Today Gold Price
இனியவை கூறல்
Free Data Entry Jobs,Mobile Sms Sending Jobs,Ad Posting Job,Home based job | Data Entry Jobs, Sms Sending Jobs, Ad Posting Jobs
Home
Online job, online home based job, online part time job, best online job, free online job, online sms sending job, online typing job, free online

asp.net

Understanding .NET Delegates and Events, By Practice - CodeProject
Events and Delegates Simplified - CodeProject
6 important uses of Delegates and Events - CodeProject
Demo - GridViewScroll with jQuery

C#

OOPS

Introduction to Object Oriented Programming Concepts (OOP) and More - CodeProject

WebService

SOA Best Practices - Four Steps to Securing Your Web Services | SOA World Magazine
Web Services Best Practices - CodeProject
Creating and Using C# Web service over HTTPS – SSL | *****## R.MARAN. ## *****
Chapter 1: Security Fundamentals for Web Services
patterns & practices Improving Web Services Security Guide - Home

All About Assemblies - CodeProject
Asynchronous Programming in C# using Iterators | Blog | TomasP.Net
Difference between Threading and Delegates in C#.net .
Explicit Conversion of Base Class to Derived Class
Lava: what is different between BCL (Base Class Library) and FCL (Framework Class Library) in Microsoft dot net (.net)?

SQL

Code to find out the query that caused the trigger to fire, for auditing: Narayana Vyas Kondreddi's homepage

IIS

Marshal's Light: Prevent IIS Session Timeout in ASP .NET

Online

mosquito nets dealer best quality in chennai various models
Mosquito Nets Supplier in Chennai - Magnetic Nets, Sleek Nets / Hinge Nets, Roller Window Nets and Window Nets Supplier & Manufacturer from Chennai, India
Aircel - Online Recharge
BSNL AT YOUR DOORSTEP---Udaan input page
GET PAID WEEKLY THROUGH YOUR FLEXIBLE PART TIME JOBS, Chennai
Enrolment Status
Aadhaar - Unique Identification
AADHAAR Card Status
www.shortcutworld.com/en/win/Visual-Studio_2010.pdf

JQuery

jQuery Fundamentals :: jQuery Basics
jQuery Caret (jCaret) Plugin - determine or set caret position
jQuery Cheatsheet
Advanced jQuery, for those that dare
jQuery - DOM Attributes
jQuery Tutorial for Beginners: Nothing But the Goods | Impressive Webs
SixZigma Tutorials » jQuery Tutorial – Learn it just in a day!
New Tab

Recipe

சத்து மாவு உருண்டை
Sathu Mavu Kanji/Kali (Multigrain Mix) - Joy of Cooking - Indian Vegetarian, Non-vegetarian, Chicken, Fish recipes with pictures for children too
Sathu maavu urundai (Multi grain laddu) - Joy of Cooking - Indian Vegetarian, Non-vegetarian, Chicken, Fish recipes with pictures for children too
30 வகை எண்ணெய் இல்லாத சமையல் ! | stufftoreadintamil
Tamilnadu Agriculture Updates | தமிழக விவசாயம் - Page 28 - SkyscraperCity
எந்த மாவில் என்ன சத்து? « கோட்டகுப்பம் செய்திகள் – நம்ப ஊரு செய்தி
பாசிப்பருப்பு நெய் உருண்டை!- moong dal laddu - Boldsky Tamil
Tease Your Taste Buds: Onion Sambar - Madras Style - with ghee-fried mini-onions ground with coconut
ஆரோக்கியம் | Myoor News
சொல்லுகிறேன்

Agri

For a better India: Biogas from azolla biomass – the ultimate energy solution
பசுமைப் பக்கங்கள் - 2 : 3 ஏக்கரில்... 23 பழவகைகள்

English

Spelling book | Confusing Words

CSS

Selectors

I

10 Interview Questions You Should Never Ask (and 5 You Always Should) | The Daily Muse
.NET Interview Questions and Answers
The end of Indian IT staffing as we know it | Reuters

Megui

How to use sharpen filters with Avisynth & MeGUI??

News

At odds on Iran: US doesn’t share Israeli zeal for military solution — RT Op-Edge
Do oil prospects justify UK ‘colonial plundering’ in Falklands? — RT Op-Edge
'United States of Amnesia': No accountability for ‘grievous errors’ in Iraq — RT News
தீர்மானமல்ல காரணம்! - Dinamani - Tamil Daily News
கருணாநிதியின் அறிவித்துள்ளது அவரது கபட நாடகம்: ஜெயலலிதா - Dinamani - Tamil Daily News

Errors & and solutions

1, Timeout Expired -  for this error, Need to check the Sql server connection string . if username and Password are Correct


2, Msg 10054, Level 20, State 0, Line 0
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

- 
Some times Sql Error Connection may get fails .

Soln :

1. Try To Execute Again .

2. Fix the Sql Connection Problem.



Friday, 22 March 2013

The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

For This Issue Please Check IF U use SQL Statements After END  So that This Issue will occur. Use it ur SQL statements inside End

Friday, 1 March 2013

no parameterless constructor defined for this object in LinqDataSource


LINQ and ConnectionString
There are some issues you should know when you are working with Database Markup Language(DBML) or generating LINQ to SQL classes in VS.2008 IDE: 


1.               Why is the dropdown box of "Choose your context object" always empty or why can't I find my context object while I am configuring LinqDataSource?
Please be sure the DLL containing the context object existed and you have a reference to it. If the LINQ class is newly created, please compile the project first before you try to configure LinqDataSource.
2.               Why do I have this error "No parameterless constructor defined for this object"?
If you remove the ConnectionString manually from the Connection element of the DBML source file first (use external text editor to remove it) and then set the Application Settings to False (also seeHow to Turn off Application Settings for LINQ), your parameterless constructor of the DataContext class (e.g., Book.designer.cs) will immediately be removed by the IDE. Then the above error will occur when you recompile and run the application.
Normally enabling Application Settings on LINQ will have the parameterless constructor generated for you automatically, as long as its ConnectionString property is not empty. Indeed, you won't be able to remove the ConnectionString property inside the IDE.  But you remove it anyway outside it. When this happens, the original parameterless contructor will lose forever regardless of Application Settings. Thereafer, adding back the ConnectionString property to the file will not resolve it. And the other problem dicussed in the next question may occur.

To resolve this, you need to manually add the original parameterless constructor back.

3.               Why does the actual connection string (like below) suddenly appear inside the parameterless contructor of my DataContext class? For example, 
    public BookDataContext() : 
        base("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Books.mdf;Integrated Security=True;User Instance=True", mappingSource) 
    { 
        OnCreated(); 
    }

Situation 1:    If you set the Application Settings to False while the ConnectionString property exists in the DBML source file, your original parameterless constructor of that DataContext class will be altered by hard-coding with the actual connection string that can be found in your .config file (e.g., web.config).
Situation 2:    The application had Application Settings set to False and the correct default parameterless constructor some time ago. Later, you make a change by adding a new table to the LINQ. As soon as you drag the new table to the DBML or LINQ designer, your original, correct parameterless contructor will be altered by hard-coding with the actual connection string.
Currently, I don't know any other easy way to deal with it. If you know, please jot me a note. What I do is
1.               First, ensure Application Settings for LINQ is set to False.
2.               Then, manually alter or copy the parameterless contructor back to the original
.
4.               Why can't I add a database table to DBML / LINQ designer?
This happens when
·                                          your Application Settings for LINQ is set to False,
·                                          ConnectionString element doesn't exist in the DBML source file, and
·                                          the parameterless constructor in LINQ class is missing.

The IDE needs to know where to read the connection string in order to access the database. Please ensure you have the parameterless contructor defined correctly while remaining Application Settings for LINQ to False and the absence of ConnectionString in the DBML source file.

public BookDataContext() :     base(global::System.Configuration.ConfigurationManager.ConnectionStrings["BookConnectionString"].ConnectionString, mappingSource) {     OnCreated(); } where BookDataContext is my DataContext class, BookConnectionString is the name of the connection string found in .config file. You should change them to fit yours accordingly.
The default setting of LINQ to SQL class is always True. You can do the following to disable it.

On VS IDE

·                     Go and double-click to open the DBML file from Solution Explorer.
·                     Then open the file Properties window if it is not open. Be sure that the focus is on the DBML designer tab; otherwise, you won't see or cannot continue with the next step.
·                     Expand Connection and then set Application Settings to False.