Abstract Class in C# Explained

Abstract class provides a common definition of a base class that many derived classes can share.

The abstract keyword enables you to create classes and class members that are incomplete and must be implemented in a derived class.

Tips:

  • An abstract class cannot be instantiated.
  • Derived classes of the abstract class must implement all abstract methods

 

Abstract class can be declared in C# using the keyword abstract as shown in the example below:

Tags: 

Batching Techniques for SQL Database Applications in Azure

Batching operations can be very helpful in improving your performance and scalability for your in house application as well as cloud applications.

Here are some of the batching techniques available for you to consider:

Transactions

Client side code based transactions can be simple and useful. Here is an example:

How to run Visual Studio as Administrator by default?

Everytime you open Visual Studio 2013 it does not run as a administrator by default, because of which you come across issues and errors which you don’t expect. 

So how to set Visual Studio to open as Administrator by default without having to do it manually every time. 

Here is how: 

  1. Right-click on the Short-cut icon for Visual Studio 

  1. Click on Properties 

  1. Goto the Shortcut Tab if you are not already there by default 

SQL Server 2008 Management Studio Error: Invalid prefix or suffix characters

Error:

Invalid prefix or suffix characters. (MS Visual Database Tools)

Solution:
When you try to right-click on a table and Select Edit Top 200 rows in SQL Server 2008 R2 Management Studio you might get the above error and not allow you to edit the rows.

Tags: 

How to Edit a Row in SQL Server 2008, 2012 using Management Studio?

I see that there is an option to Edit the Top 200 rows in a Table, but how can I edit a particular row that I need.

Solution:

This is a common requirement to be able to edit any particular row and not just the top 200 rows which is provided by default in SQL Server 2008, 2012 and forward.

What you need to do is.

Tags: 

How to Enable SQL Command Mode in SQL Server?

Error:

Incorrect syntax near ':'.

SQLCMD mode must be enabled to successfully execute this script.

 

Solution:

At times some of the SQL Scripts that you run might need the SQL Command Mode enabled to be able to execute successfully.

Its in such scenarios do you get the above Error which wants you to enable the SQLCMD mode.

Here is how you can enable the SQL CMD mode. In your SQL Server Management Studio

Tags: 

SQL Script to Verify the Database backup file

Here is the SQL Script to be able to Verify the Database Backup file before you want to Restore it. This will let you know if your Backup is fine and usable or Corrupt and not usable.

RESTORE VERIFYONLY
FROM DISK='C:\YourDatabase.bak'

GO

IF @@ERROR = 0
BEGIN
PRINT 'Your Backup is in a Usable State'
END
ELSE
BEGIN
PRINT 'Sorry, Your Backup is corrupt and is not in a Usable State'
END
GO

Pages