Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

CreateUserWizard control to create user accounts in asp.net membership

Dec 31, 2011 8 comments
Introduction:

In this article I will explain how to create users using CreateUserWizard using asp.net membership concept.

Description:

In previous post I explained clearly how to install asp.net membership database schema in SQL Server . After install asp.net membership database
check your database everything installed and ready to use in our application or not. 

JQuery Custom Styles for Radio button, checkbox, dropdownlist and textbox in asp.net

Dec 29, 2011 8 comments
Introduction:

In this article I will explain how to change the style of radiobutton, checkbox, dropdownlist, textbox and buttons in asp.net using JQuery.


Description:
  
In previous posts I explained many articles relating to JQuery those are fancy zoom effect for image and Change Controls background and border color when validation fails etc. Now I will explain how to change the style of form controls using JQuery in asp.net.
In one of the website I saw registration form that contains controls with rich interface all the controls looking very beautiful. After seen that one I decided to write post to explain about how to change form controls dynamically in asp.net we can implement this functionality easily by using available JQuery plugins.

JQuery fancy Zoom effect for Image in asp.net | JQuery Increase Size of image when click on it in asp.net

Dec 28, 2011 20 comments
Introduction:

In this article I will explain how to implement fancy zoom effect for image when we click on particular image using JQuery in asp.net.


Description:
  
In previous post I explained about
JQuery Image slideshow gallery to display images slideshow. Now in this article I will explain how to increase size of image or implement zoom effect for image when we click on particular image in asp.net. 

JQuery Highlight border and background color of form controls when validation fails in asp.net

Dec 27, 2011 11 comments
Introduction:

In this article I will explain how to highlight or change background and border color of form controls when validation fails in asp.net using JQuery.


Description:
  
In previous articles I explained about Display validation error messages with images and Change textbox background when validation fails and Ajax Password Strength using asp.net . Now I will explain how to highlight form controls when validation fails using JQuery in asp.net.

JQuery Check Password Strength Example in asp.net | Display Validation error message with images in asp.net

Dec 26, 2011 6 comments
Introduction:

In this article I will explain how to display images whenever validation fails in form using JQuery and I will explain how to check password strength using JQuery in asp.net.


Description:
  
In previous articles I explained about form validations using JavaScript  and Ajax Password Strength using asp.net . Now I will explain how to show the images when validation fails and I will explain how to show the password strength using JQuery in asp.net.

Asp.net - The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Dec 25, 2011 50 comments
Introduction: 

Here I will explain how to solve the problem “The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).” when running web application using asp.net. 

Description: 

I created one web application and added some of script files in header section of page like this

<head id="head2" runat="server">
<title>Lightbox Page</title>
<link href="aspdotnetsuresh.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%= ResolveUrl("~/js/LightBox.js") %>"></script>
</head>
After add script file to header section i tried to run the application during that time I got error like The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Visual Studio - unable to start debugging on the web server. The web server did not respond in a timely manner

17 comments
Introduction: 

Here I will explain how to solve the problem “unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server.” when compiling in visual studio and running web application using asp.net.

Description:

In my machine I opened visual studio and tried to run application that works perfectly. After make some modifications in code and tried to run application using visual studio I got error like “unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server”.

Open/Close or Show/Hide Ajax Modalpopupextender using JavaScript in asp.net

Dec 24, 2011 19 comments
Introduction: 

Here I will explain how to show/hide Ajax modalpopupextender using JavaScript in asp.net.

Description: 

In previous posts I explained some of the samples relating to Ajax modalpopupextender. During the time whenever I worked on to prepare samples for Ajax modalpopupextender I got requirement like close the modalpopupextender whenever I click on close icon for that more check this example Ajax Confirmation box. Generally in Ajax modalpopupextender we will set two properties TargetControlID and CancelControlID like

Asp.net confirmation box with yes/no button options using modalpopup

Dec 23, 2011 15 comments
Introduction: 

Here I will explain how to implement confirmation box with Yes/No button options and change the style of Confirmation box in asp.net using Ajax ModalPopupExtender.

Description:

In many situations we will use confirmation box ex: During delete one record we will ask confirmation of user like “Are you sure you want to delete record?” if user clicks on Ok button we will delete particular record otherwise if clicks on Cancel button then we won’t delete users. Initially our default confirmation box will be like this

Bind or add tooltip for dropdownlist items in asp.net | Handle Long text problem in dropdownlist using asp.net

Dec 19, 2011 12 comments
Introduction:

In this article I will explain how to add tooltip for dropdownlist item in asp.net.

Description:
  
In Previous article I explained clearly how to bind images to dropdownlist. Now I will explain how to add tooltips for dropdownlist item in asp.net. In many situations we will use dropdownlists in our application if it contain less length of data then it will display the data correctly otherwise if it contains more length of data then user will not be able to see entire data that would be like this 

JQuery change the style of tooltip in asp.net | Gridview header and columns tooltip in asp.net

Dec 18, 2011 7 comments
Introduction:

In this article I will explain how to change the style of tooltips in asp.net using JQuery.


Description:

In my previous posts I explained clearly how to show the tooltip for girdiview rows and columns and show tooltip for gridview header here I am using these posts to bind gridview with tooltips. In our websites we will apply tooltips for many controls whenever we apply tooltips for controls initially that would be like this

JQuery Bind images to dropdownlist in asp.net

Dec 17, 2011 45 comments
Introduction:

In this article I will explain how to bind images to dropdownlist in asp.net using JQuery.
Description:
  
In previous articles I explained about how to implement cascading dropdownlist  and Ajax Cascading dropdownlist. Now I will explain how to bind dropdownlist with images dynamically in asp.net using JQuery. In one of website I saw one dropdownlist that contains Country names along with country flags. I feel it’s better to write post to explain how to bind images to dropdownlist in asp.net. To implement this concept by using JQuery plugin we can achieve this easily.  

JQuery lightbox image slideshow gallery in asp.net

Dec 15, 2011 86 comments
Introduction:

In this article I will explain how to create lightbox image slideshow in asp.net using JQuery.


Description:
  
In previous post I explained about Ajax SlideshowExtender sample to display images slideshow. Now in this article I will explain how to create lightbox image slideshow in asp.net using JQuery. In many websites generally we will see different types of slideshows like whenever we click on image that is automatically open with lightbox effect and we have a chance to see all the remaining images by press next or previous options in slideshow. All these Slideshows are implemented by using JQuery plugins. After seen those slideshows I decided to write post to use JQuery plugins to implement beautiful slideshown in asp.net. 


Failed to access IIS metabase in ASP.NET

Dec 13, 2011 5 comments
Introduction: 

Here I will explain how to solve the problem “Failed to access IIS metabase ASP.NET” when we try to browse website using asp.net

Description:

In my machine I tried to access one of the website from IIS at that time I got error like “Failed to access IIS metabase ASP.NET”. I realized that problem because of process model user account (in our case, ASPNET) does not have the correct user rights for the required system files and folders to run the ASP.NET worker process and apparently there is a bug in the ASP.NET install.

Method error 500/12031 in ajax cascadingdropdown extender | AJAX CascadingDropDown - Method Error 500

Dec 12, 2011 10 comments
Introduction: 

Here I will explain how to solve the problem “Method error 500/12031 in ajax cascadingdropdown extender using asp.net. 

Description:

In previous post I explained clearly about Ajax cascading dropdownlist sample. Generally during implementation of cascading dropdonlist we will see our dropdowns shows error like “Method error 500 or Method Error 12031”. This error is occurred because of missing following line of code in WebService.

Export selected rows of gridview to Excel or word in ASP.Net

16 comments
Introduction:

Here I will explain how to export only selected or checked rows or records from gridview to Word or Excel sheet using asp.net.


Description:

In my previous posts I explained clearly how to export gridview data to Excel or word using asp.net and how to export gridview data to PDF using asp.net and explained another post that is Export gridview data to CSV file using asp.net. After explain all the concepts one of the user has asked me a question i.e. how to export gridview records to excel/word based on checkbox selection in gridview. To implement this one first design one table in database as shown below and give name as “UserInformation” 

Query to Find Nth Highest Salary of Employee In Sql Server | Query to Find 2nd or 3rd highest salary of employee in SQL Server

Dec 10, 2011 30 comments
Introduction:

In this article I will explain how to find nth highest salary of the employee in SQL Server.

Description:

In many sites we will find one frequent question that is like how to find 2nd highest salary of employee or how to find 3rd highest salary of employee or how to find nth highest salary of employee in SQL Server. To get required highest salary we are having different alternative ways.

Joins in sql server, Inner Join,Cross Join,Left Outer Join,Equi join, Right Outer Join, Full Outer Join

72 comments
Introduction:

In this post I will explain what are the Joins in SQL Server and different types of Joins example (SQL LEFT outer Join, SQL RIGHT outer Join, SQL FULL outer Join, SQL Cross Join, SQL inner Join sample, Self Join example) and uses of Joins in SQL Server.

Description:

In SQL joins are used to get data from two or more tables based on relationship between some of the columns in tables. In most of the cases we will use primary key of first table and foreign key of secondary table to get data from tables by using this relationship we can reduce the duplication of data in every table.

Simple login form example in asp.net Check Username and Password availability in database

Dec 8, 2011 131 comments
Introduction

In this post I will explain how to implement simple login form using asp.net and I will explain how to Check Username and Password Exists in database using asp.net .

Description: 

One day I got mail from one of the reader he has asked about how to implement simple login form to check username and password details of user in database. If user details exist in database then we need to redirect user to welcome page otherwise we need to display “Invalid Username/Password”. Mostly it’s common for all the websites before access the website. I know that many of them feel it’s very easy but for the people who have started learning .NET they don’t know how to implement this because of that I decided to write post to help for the persons who is in need with this requirement. 

A potentially dangerous Request.Form value was detected from the client in asp.net

Dec 4, 2011 37 comments
Introduction:

In this post I will explain how to solve the problem “A potentially dangerous Request.Form value was detected from the client in ASP.NET WebForms” using asp.net.

Description: 

In previous post I explained clearly about Rich textbox sample in asp.net . After completion code if I try to insert some html formatted data in database using rich textbox I got error like “A potentially dangerous Request.Form value was detected from the client in ASP.NET WebForms

Search Records In GridView And Highlight Results Using ASP.NET | how to highlight search results in gridview using asp.net

Dec 3, 2011 72 comments
Introduction:

In this article I will explain how to search records in gridview and highlight search keywords in gridview using asp.net.


Description:

In Previous post I explained clearly about how to filter gridview records with dropdownlist selection. Now I will explain how to implement search functionality for gridview and highlight search keywords in gridview using asp.net. 

SQL Server Error - Saving Changes in not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created

Dec 1, 2011 7 comments
Introduction

Here I will explain how to enable prevent saving changes in sql server or to solve the problem of “Saving Changes in not permitted. The changes you have made require the following tables to be dropped and re-created.etc” in SQL Server.

Description

I have installed SQL Server 2008 in my laptop after successfully installed I opened SQL Server Management studio and created new table like this 

how to set default home page in IE and Mozilla using JavaScript in asp.net

2 comments
Introduction

Here I will explain how to set default home page in browser using JavaScript in asp.net.

Description

In many major websites we will see link like “Set as a home page” if we click on that home page link that will automatically change our browser default home page url to their particular page url. In IE browser we can easily set home page just by simple code but Mozilla we don’t have a chance to set home directly because of security concerns. If we want to set the home page in Mozilla first we need to set signed.applets.codebase_principal_support to true then run the below code to set home page initially that is in false mode. 

Add Bookmark link to website using javascript | Add to Favorites (IE) / Bookmark (Firefox) using Javascript

7 comments
Introduction

Here I will explain how to add bookmark link to our website using JavaScript in asp.net.

Description

In many websites we will see link like “Bookmark this Site” if we click on that bookmark link that will prompts the user with dialog box to add that specified link in favorites list. If we want to add that type functionality to our website we can write in different ways. Here I will explain in two different ways to add Bookmark functionality

Disable browser back button functionality using JavaScript in asp.net | ASP.Net disable browser back button (using javascript)

Nov 30, 2011 48 comments
Introduction

Here I will explain how to disable browser back button functionality using JavaScript in asp.net.

Description

One day I got requirement like disable browser back button to prevent users going back to previous page using back button of the browser. I search many sites for proper code to prevent users navigating back to previous page but there is no use because some of them work in IE but not in Mozilla and some of them will work in Mozilla but not in IE.

Read or Write connection strings in web.config file using asp.net

Nov 27, 2011 25 comments
Introduction:

In this article I will explain how to read or write connection strings in web.config file using asp.net.


Description:

In Previous article I explained clearly about Encrypt or Decrypt connection strings in web.config file using asp.net. Now I will explain how to write connection strings in web.config file and how to read connection strings from web.config file using asp.net. 

Asp.net- Encrypt and Decrypt connection strings in web.config file

12 comments
Introduction:

In this article I will explain how to encrypt or decrypt connectionStrings in web.config file using asp.net.


Description:

In Previous posts I explained lot of articles regarding
Asp.net, Gridview, SQL Server, Ajax, JavaScript etc. In many of articles I used connectionStrings section in web.config file to store database connection. The connectionStrings section contains sensitive information of database connections including username and password of database. Is it secured to store the sensitive information of database connections in plain text files called web.config and machine.config files? 

how to install Ajax Control Toolkit in Visual Studio | What is AJAX| uses of ajax in asp.net

Nov 23, 2011 23 comments
Introduction:

In this article I will explain how to install Ajax Control Toolkit in visual studio and uses of Ajax controls in asp.net.

Description:

First of all what is Ajax why we go for that one? Is there any specific reasons to use that in our applications?

how to debugg vbscript files or .vbs files using visual studio | how to open or run vbscript files or .vbs files

Nov 22, 2011 17 comments
Introduction:

In this article I will explain how to run vbscript or .vbs file and how to debug vbscript or .vbs file using visual studio.


Description:

One day I got requirement like to work with vbscript during that time I don’t have idea on vbscript to run script file and I face too much problem to know how to debug vbscript. At that time I decided to write a post to explain how to run vbscript file and how to debug vbscript file or .vbs file using visual studio.

Ajax tabcontainer Example/Sample in asp.net | Change the Style of Ajax tabContainer in asp.net

Nov 19, 2011 36 comments
Introduction:

Here I will explain how to use Ajax Tabcontainer in asp.net and how to change the appearance of TabContainer using CSS styles in asp.net.

Description:


I have one web page that page contains lot of information about user like user profile details, job details and new user registration details because of that huge controls and data I was unable to maintain the webpage effectively. 

At that time I decided to use Ajax Tabcontainer to use web page space effectively. Tab container contains set of tabs that can be used to organize the page content. Tab Container is a host for number of TabPanels. Each TabPanel defines its HeaderText or HeaderTemplate as well as a ContentTemplate that defines its content. 

One more thing don't hesitate to learn the post completely after seen the length of the post because it's huge for looking but nothing is there just design only the page contains 3 TabPanels that's why code is more and it's very easy to work with TabContainer

how to pass parameters to crystal reports / .rdlc reports using asp.net | Passing Parameters from ASP.NET Application to Crystal Report using asp.net

Nov 17, 2011 21 comments
Introduction:

In this article I will explain how to pass parameters to crystal reports using asp.net.


Description:

In Previous post I explained clearly about how to create crystal report using asp.net. Now I will explain how to load crystal reports based on parameters using asp.net. This post is continuation of previous post Create crystal report using asp.net. if you didn’t read previous post crystal reports please check that one then come to this one because I am continuing from previous post in that I explained clearly to create the database tables and bind the reports and display it on page. 

How to create Crystal Reports in asp.net | Crystal Reports Sample Using asp.net

Nov 15, 2011 58 comments
Introduction:

In this article I will explain how to create crystalreports in asp.net.


Description:

In Previous posts I explained lot of articles regarding Asp.net,
Gridview, SQL Server, Ajax, JavaScript etc. Now I will explain about crystal reports it is standard reporting tool for visual studio by using these we can display reports regarding employee details and display charts etc and crystal reports need minimal coding to display result. 

Asp.net filter gridview records with dropdownlist selection | Gridview Filter Expression with dropdownlist using asp.net | Beautiful style for Gridview using css

Nov 12, 2011 21 comments
Introduction:

In this article I will explain how to change the appearance of gridview and how to filter gridview records with dropdownlist selection using asp.net.


Description:

In Previous posts I explained lot of articles regarding
Gridview. Now I will explain how to implement beautiful looking gridview and filter gridview records with dropdownlist selection using asp.net. To implement this first design the table in database and give name UserInfomation

how to implement cascading dropdownlist in gridview using asp.net

10 comments
Introduction:

In this article I will explain how to implement cascading dropdownlist in gridview using asp.net. 


Description:

In Previous posts I explained clearly how to implement ajax cascading dropdownlist using asp.net  and lot of articles regarding
Gridview. Now I will explain how to implement cascading dropdown list in gridview using asp.net. Here I am using previous implemented article ajax cascading dropdownlist in asp.net to bind data to dropdownlists. 

JQuery scrollable gridview with fixed header in asp.net

Nov 9, 2011 76 comments
Introduction:

In this article I will explain how to implement scrollable gridview with fixed header in asp.net using JQuery. 


Description:

In Previous posts I explained lot of articles regarding Gridview. Now I will explain how to implement scrollable gridview with fixed header in asp.net. I have one gridview that contains lot of records and I used paging for gridview but the requirement is to display all the records without paging. I removed paging at that time gridview occupied lot of space because it contains more records to solve this problem we implemented scrollbar.  After scrollbar implementation if we scroll the gridview we are unable to see Gridview header. 

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Nov 7, 2011 12 comments
Introduction:

Here I will explain how to solve the problem “A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)” during the time of connect to database.

what are the sealed classes in c# | uses of sealed keyword in c# |Sealed classes example in c# | Object-Oriented Programming: Sealed Classes

Nov 6, 2011 18 comments
Introduction

Here I will explain what are the sealed classes in c# and uses of sealed classes in c#.

Description:

In previous article I explained clearly about OOPS concepts now I will explain what is the use of sealed classes in c#. Generally if we create classes we can inherit the properties of that created class in any class without having any restrictions. In some situation we will get requirement like we don’t want to give permission for the users to derive the classes from it or don’t allow users to inherit the properties from particular class in that situations what we can do? 

where is asp.net 3.5 in IIS | how to publish/setup asp.net 3.0 and 3.5 applications on IIS.

Nov 5, 2011 4 comments

Introduction:

In this article I will explain where is asp.net 3.5 in IIS and how to setup asp.net 3.0 and 3.5 applications on IIS and how to publish asp.net 3.5 applications on IIS.

Description:

I am writing this post because in one of the interview interviewer has asked one interesting question that is now you’re using .NET 3.5 if I want to deploy .NET 3.5 version web application which type asp.net version I need to select in IIS or same question another way if I setup .NET 3.5 framework version on my machine whether I will get 3.5 version in IIS ASP.NET version dropdown or I will get only 2.0.50727, 1.1.4322 versions.

Disable Copy Paste cut options in textbox using javascript in asp.net

Oct 30, 2011 6 comments
Introduction

Here I will explain how to disable copy, cut and paste functionality (Ctrl + c/Ctrl + v/ Ctrl+ x) in asp.net textbox using JavaScript.

Description

In previous post I explained clearly how to disable right click on asp.net web page. Now I will explain how to disable copy, cut, paste or Ctrl+c, Ctrl+v, Ctrl+x options in textbox on aspx page in asp.net. To achieve this we have two methods first method is directly set copy, cut and paste options return false in textbox to disable and second one we can use JavaScript functionality to disable copy, cut and paste options to implement this one first create new website and design your Default.aspx page like this 

How to disable right click on asp.net web page using JavaScript | Disable mouse right click on webpage

19 comments
Introduction

Here I will explain how to disable right click on website using JavaScript.

Description

One day I got requirement like do not allow users to right click on website to see source code of page for that I written JavaScript functionality to disable right click on website to achieve this create new website and design your Default.aspx page like this 

How to change Page theme dynamically in asp.net | How to change website theme dynamically at runtime using asp.net

Oct 29, 2011 11 comments
Introduction:

In this article I will explain how to change themes dynamically using asp.net.

Description:


In many sites if you observe we found options like changing the color of websites based on selection of color after seen those type of theme change options I decided to write the post to change the themes dynamically by using asp.net.

What is an application object and where we use application object in asp.net | application object sample using asp.net

Oct 18, 2011 21 comments
Introduction:

In this article I will explain what application object is and I will explain how we will use application objects in asp.net.


Description:

Today I am writing this post to explain about application object in asp.net. In one of the interview I got question like what application object is and where we will use application object in asp.net.

The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user

Oct 16, 2011 4 comments

Introduction:

Here I will explain how to solve the problem
The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user during personalization of webpart in application.

Description:

During the time of webpart personalization of application I got error like

Failed to update database because the database is read-only | Failed to update database "XXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only in iis

3 comments
Introduction:

Here I will explain how to solve the problem
Failed to update database "XXXXXX\APP_DATA\DBSQAFTP.MDF" because the database is read-only during the time of publish application using asp.net.

Description:

I deployed one of my website in IIS and trying to test the application during that time I got error like this

What are the Differences between ASP.NET 3.5 and ASP.NET 4.0 | What are new features in Asp.net 4.0

19 comments
Introduction

Here I will explain about differences between Asp.net 3.5 and Asp.net 4.0. 

Description

In previous post I explained differences between asp.net 1.0 and asp.net 2.0 and in another post I explained differences between asp.net 2.0 and asp.net 3.5 . Now I will explain about differences between asp.net 3.5 and asp.net 4.0.

What are the Differences between asp.net 1.0, asp.net 1.1 and asp.net 2.0

Oct 10, 2011 0 comments
Here I will explain about differences between asp.net 1.0, 1.1 and 2.0 versions. 

Asp.net 1.0 & 1.1 version

In these Asp.net versions IIS should be installed by user.  

Asp.net 2.0 version

In this version IIS comes along with dotnet installation no need to install separately and in Asp.net 2.0 many new features has came into picture like partial classes, master pages, skins and themes, roles and membership profiles, Generics and many new controls etc. I will explain each feature clearly. Main purpose of Asp.net 2.0 is used to increase productivity, use same controls for all types of devices, faster and better web application.

what are the Difference between ASP.NET 2.0 and ASP.NET 3.5 | Multi Targeting in asp.net | what are the Asp.net 3.5 features

Oct 7, 2011 12 comments
Here I will explain about differences between asp.net 2.0/3.0/3.5. Generally we will see the questions like difference between Asp.net 2.0, 3.0 and 3.5 but there is no Asp.net 3.0 version. We have a version of 3.0 .NET Framework.

Asp.net create watermark text for textbox in javascript

Oct 6, 2011 14 comments
Introduction

In this article I will explain how to create or set watermark text for textbox using JavaScript.

Description:

One day I got requirement like showing watermark text in textbox to achieve this requirement I used JavaScript functionality for that first Design your aspx page like this 

Interview Questions Part-7 | What is a deadlock in SQL Server | What are “GRANT” and “REVOKE’ statements in SQL | How do you find the Second highest Salary in SQL Server

Oct 5, 2011 5 comments
What is a deadlock in SQL Server?

Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other’s piece. Each process would wait indefinitely for the other to release the lock, unless one of the user processes is terminated.

Interview Questions Part-6 | What is @@ROWCOUNT in SQL | What is Difference between Commit and Rollback in SQL | What is Candidate key, alternate key and composite key in SQL | What are Isolation Levels in SQL | What is Lock Escalation in SQL Server

0 comments
What is the Use of @@ROWCOUNT?

Returns the number of rows affected by the Query.

Ex:

UPDATE authors SET au_lname = 'Jones'
WHERE au_id = '999-888-7777'
IF @@ROWCOUNT = 0
print 'Warning: No rows were updated'
© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.