Monday

Database Repair Tool: How to Repair MS SQL Database Using Stellar Phoenix SQL Database Repair Tool

Introduction

Stellar Phoenix SQL Database repair tool is able to repair corrupt .mdf and .ndf files. Few important features of this tool are:

  • The tool supports MS SQL Server 2016, 2014, 2012, 2008 and all the lower versions. 
  • It has the ability of self-reconnect after interruption on the repairing process.
  • Restores the compressed (Row compressed, page compressed) data.
  • Recovery of clustered and non-clustered indexes. Etc

Step 1: Download and install from here Stellar Phoenix SQL Database Repair 

The main interface of the tool looks like this. Select the corrupt database (.mdf) file.

Stellar Phoenix SQL Database Repair

User can also use Search the .mdf file in the specific drive by Search in Folder option. To include the deleted records, click on the check box.

Include Deleted Records

Step 2: Open the corrupt .mdf to start Repair Process.

Repair Process
Step 3: Click on the Repair button to start the repair process as shown in the figure below:

start repair
Step 4: After completion of the repair process, User become able to see the preview of the data.

preview of the data

Step 5: User have option to save the log report in .XLS, .HTML and CSV formats. Click on the Save Log option which is present in the top ribbon then save the log file.

Save Log

Step 6: To register the tool, click on the Registration button then select the appropriate option.

Registration

Conclusion

Steller Phoenix SQL Database Repair helps to repair all SQL Server database (SQL 2008, 2012, 2014, 2016 & lower  versionbs) with great perfection. This tools is enabled with great capability to recover corrupted SQL database of all versions up to date.

Relevant Reading

Wednesday

Jquery: How to allow only alphabets in textbox using Jquery

Introduction

This example will explain how to allow only characters [a/z] in text box using Jquery. It will restrict to write you special characters, functions keys and other keys as well.

Main Features

It will allow backspaces and white spaces while entering the text in input text box.
If you like to write capital letter then need to on Caps Lock of your keyboard.
Jquery Textbox Alphabets

Mostly When It required

It is mostly required when letting to user enter his name, Company Name, Organization name etc.

Summary

Really, Jquery is still playing vital role to make our front end more interactive and user friendly.
Already demonstrated above all steps that how to allow only characters [a/z] in text box using Jquery.

Working Example

Relevant Reading

Friday

Jquery Datepicker: How to Implement Jquery Datepicker

Introduction

Jquery is now a day’s very powerful tool to make your UI more robust and interactive.
I am also explaining about Jquery Fiddle/example from last few days along with C#, MVC, ASP.Net examples. In this article, I am going to explain Jquery Interactive Calendar with its flexible properties. Here, you can change Your Calendar Year, Month instantly rather than tying into input box, moreover added UI CSS to make look and feel more sober.
Jquery Datepicker

Jquery MVC: Upload Image using jquery MVC

Introduction

Image Upload is very important work in our web application. It is most orderly needed whereas registering profile somebody with profile image, making album etc. I have explained during this article, how to upload image in MVC application (Razor Engine) using Jquery and preview image instantly. Image Uploading is gorgeous task of your application whenever search somebody image, if profile image is blur or heavy image then it'll increase your process time, blur image will lead to dangerous impact in visitor's mind means that cut traffic towards website or user profile. I have bring up a dashing working example.

Saturday

Jquery: Capitalize the First Letter of String Using Jquery

Introduction

Today, I am explaining one more working example of Jquery. I have explained how we can capitalize first letter of string using Jquery. It is very common requirements while we are typing sentence in input box. I have used JSfiddle to run here fully working example of Jquery.
Jquery Capitalize First Letter

MVC ModelState: ModelState Return always false using MVC

Introduction

I am today explaining one more very nasty error about ModelState Error. We daily work on MVC Apps using Model, sometime we get ModelState returning always false at that time, it is more required to diagnose our errors in shot period and take immediately action to remove our ModelState errors.

Tuesday

SQL Server Installation Fix: Repair a Failed SQL Server 2016 Installation

Introduction

SQL Server 2016 is a recently released version of Microsoft’s popular database platform that is developed with inbuilt advanced analytic and higher security technology. It targets all the critical applications and deeper insights in your data across on-premises and cloud. Here are few tips to handle the installation process to avoid the failure along with the method to repair the failed SQL Server 2016 Installation.

Scenarios when SQL server 2016 installation failed and need repair operation

  • When an instance of SQL Server got corrupted after successful installation and you need to repair that particular instance only.
  • When you need to repair a particular instance of SQL Server in case the upgrade operation is cancelled or failed after the instance name is mapped to the newly-upgraded instance.

If the following message appears in summary log, you need to repair the failed upgrade instance:

Error message: "SQL Server upgrade failed. To continue, investigate the reason for the failure, correct the problem, and then repair your installation."

In case the following message appears in the summary log, you need to uninstall and reinstall SQL Server, as you will not be able to repair the SQL Server instance.

Error Message:"SQL Server upgrade failed. To continue, investigate the reason for the failure, correct the problem."
When you repair an instance of SQL Server all the missing or corrupt files, registry keys are replaced with the new ones and all missing or invalid configuration values are set to their default values.
Note: Before initiating SQL Server failover clusters, remember that the repair process must be run on individual cluster nodes only. To repair a failover cluster node after a failed prepare operation, use Remove node and then continue performing the Prepare step again.
Repair steps when SQL Server installation get failed from the Installation Center
  1. Run the SQL Server Setup application (setup.exe) from SQL Server installation media.
  2. When you are done with prerequisites and system verification, you will be prompted to the Setup program that displays the SQL Server Installation Center page.
  3. Now, select Maintenance located in the left-hand navigation area, and click Repair to initiate the repair operation.
  4. The next window runs all the setup support rule and file routines to get assurance about all the prerequisites installed and then Setup validation rules. Now, select OK button or Install to continue.
  5. Now, on the Select Instance page, choose the instance you want to repair, and click ‘Next’ button.
  6. To validate the operation repair rules will run, click ‘Next’ to continue.
  7. The next page will be ‘Ready to Repair page’, which indicates that the operation is ready to proceed, click Repair.
  8. You will be able to view the status of the repair operation through Repair Progress page.

SQL Server Installation Fix
Steps to repair failed installation of SQL Server using Command Prompt

You can also run the given command at a command prompt to repair failed installation:
‘Setup.exe /q /ACTION=Repair /INSTANCENAME=instancename’

Summary

These are the manual steps you can use to repair a failed SQL server 2016 installation. But in case you are unable to repair SQL instances then you can always go with the alternate solutions available in the market. There are various SQL repair tools available that offer you advanced modules to repair SQL 2016 instances without following many steps.

Relevant Reading

Author Bio: Priyanka Chouhan is a technical writer in Stellar Data Recovery with 5 years of experience and has written several articles on SQL server & SharePoint. In the spare time, she loves reading and gardening.

Saturday

Csharp Example: Text to Speech

Introduction

Today, I am providing a working example of text to speech using .Net framework 4.5 with System.Text namespace. Text to speech is used widely in large scale for different purposes.
I am explaining all steps how to convert Text to Speech using C#, .Net framework.

Step 1. First of all, we have to add reference of System.Speech in our Text Speech application.

System.Speech

Step 2. Now import namespace using System.Speech.Synthesis in our form.
using System.Speech.Synthesis; 
Step 3. Now create object of SpeechSynthesizer
SpeechSynthesizer speech = new SpeechSynthesizer(); 
Step 4. Next one, write this line code speech.SpeakAsync(textBox1.Text) on button click.
speech.SpeakAsync(textBox1.Text); 
Step 5. Run application using F5 button to view Text speech interface.
Step 6. Enter sample text in input box to read through our application.
Step 7. Finally you can see how gracefully reading our text using our C# application.
Start Speech

Summary

Explained above, all steps Text to Speech using C# .Net framework 4.5 with working sample. I have attached working sample at the bottom of this article.
If anybody need help or further queries then write here.
Download

Video: Click here to Text to Speech Video Tutorial

Relevant Reading

Tuesday

MVC Caching: How to Disable Automatic Caching in ASP.Net MVC

Introduction

Today, I am explaining very important part of MVC application, just explaining about how to disable automatic caching in ASP.Net MVC application. It is very important in our MVC app while we don't allow end user to navigate browser cache (next, previous button etc.). MVC has provided feature to disable caching in ASP.Net MVC application.

Sunday

Count Down Timer: Jquery Timer Countdown in MVC Application

Introduction

Timer countdown is very important in our web apps while we are restricting to end user within specified time frame for example apps online Quiz, online survey etc. Here, in this article I am explain in full depth, how to implement Jquery/JavaScript timer count down in our web apps.

Step 1:First of all add following time to start count down while open our MVC web app, here I am adding 2 minutes of time count down.

public ActionResult Index()
{
  if (Session["Rem_Time"] == null)
  {
     Session["Rem_Time"] = DateTime.Now.AddMinutes(2).ToString("dd-MM-yyyy h:mm:ss tt");
   }
   ViewBag.Rem_Time = Session["Rem_Time"];

   ViewBag.Message = "Modify this template to jump-start your MVC application.";
   return View();
}
Step 2: Add following div in Index page of our MVC apps _layout.cshtml page.

id timecountdown

Step 3: Add following script in our MVC web app which will display time (hour, minutes, secs).

Interval Time Count Down

Populating JavaScript Timer Count Down in MVC Web Application

Finally, you can see how populating JavaScript Timer Count Down in MVC Web Application. I hope it will help you all. 
MVC Timer Count Down

Conclusion

I have explained fully with step to step, how we can implement Jquery timer count down in our MVC web apps. If any queries then let me know, I am very happy to reply all of your queries.

Download Complete Project

Download

Suggested Reading

Thursday

Dropdown List: Cascading Dropdown list in MVC

Introduction

Today, I am explaining about cascading drop down list in MVC, while we are working on CRM, ERP, Web Apps or other web apps then we often require to populate cascading dropdown list e.g. First populate Country then select country from list then corresponding state will be populated in other dropdown. This is the way that how we need cascading dropdown list in our MVC applications. Here I am taking example, first populating drop down list of classes, on the click of classes, the other drop down list will be populated of Subjects and then while we click on Subjects then chapter will be populated correspondingly.

Add Entity Framework Model in MVC Project

First of all, you have to add entities in our project to populate cascading drop down in our project. I am providing a video link (Add Entities) which explains all steps how to add entities in our project using entity framework.

namespace MvcApplication1.Context
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    
    public partial class MVC_AppEntities1 : DbContext
    {
        public MVC_AppEntities1()
            : base("name=MVC_AppEntities1")
        {
        }
    
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    
        public virtual DbSet tblChapterMasters { get; set; }
        public virtual DbSet tblClassMasters { get; set; }
        public virtual DbSet tblSubjectMasters { get; set; }
    }
}

Populate First Dropdown List (Subjects)

Here I have written an action method in controller as below:
[HttpGet]
public ActionResult My_MVC_App(string ddlClasses, string ddlSubjects, string ddlChapters)
{
    var _context = new MVC_AppEntities1();
    List _classlst = GetClasses();

   // Clases
   List li = new List();
   foreach (var item in _classlst)
   {
   li.Add(new SelectListItem { Text = item.ClassName, Value = item.ClassIDPK.ToString() });
   }
   ViewData["Classes"] = li;

   return View();
}

Populate Second Dropdown List (Subjects)

Next step is to write action method to populate second dropdown list of subject while we click on classes drop down list.
[HttpGet]
public JsonResult GetSubjectsNew(Int16 ClassID)
{
    List _lstSubjects = GetSubjectsID(ClassID);
    List _liSubj = new List();
    /// 
    var _context = new MVC_AppEntities1();
foreach (var _itemsubject in _lstSubjects)
{
  _liSubj.Add(new SelectListItem { Text = _itemsubject.SubjectName, Value = _itemsubject.SubjectIDPK.ToString() });
}

return Json(new SelectList(_liSubj, "Value", "Text"), JsonRequestBehavior.AllowGet);
  

Populate Third Dropdown List (Chapter)

Now next step is to populate third dropdown list of chapters while we click on subjects correspondingly.

 [HttpGet]
 public JsonResult GetChapterList(Int16 SubjectID, Int32? ChapterID)
{
   List _lstChapters = GetChapters(SubjectID);
   List _liSubj = new List();

   foreach (var _itemsubject in _lstChapters)
   {
     _liSubj.Add(new SelectListItem { Text = _itemsubject.ChapterName, Value = _itemsubject.ChapterIDPK.ToString() });
   }
   return Json(new SelectList(_liSubj, "Value", "Text"), JsonRequestBehavior.AllowGet);
}

Helping Method to Populate All Dropdowns (Classes, Subjects, Chapters)

Helping Methods

I have explained below three helping methods to populate all drop downs correspondingly.

MVC Razor View
Now I am talking about MVC razor view where we are playing with all three drop downs interface.

Import Jquery Library in our Project (Under Head Tag)


Head Tag

MVC Razor HTML Helpers

Below is written code to provide complete interface to populate three dropdowns.

razor view

Jquery Ajax call to MVC Controller

Here is written a Ajax/Jquery method to call Controller action for for subjects

Class Jquery Ajax Call

Here is written other Ajax/Jquery method to call Controller action for the chapters as below:

Chapter Jquery Ajax Call

Conclusion

Explained above about cascading dropdown in MVC with concerned every aspect of the MVC apps. Cascading dropdown is the common requirement of our each MVC applications, if we skip few steps to cascading drop down then sometimes it waste our very precious time of development.

Development Environment

Visual Studio 2013, Entity Framework 6.0, Database script under app folder App_Data, Change web.config settings according to your machine specific, Data source, Initial Catalog, Database User ID, Password etc.

Download Complete Project

Download

Relevant Reading

Sunday

Entity Framework Error: Compiling transformation metadata file entity framework

Introduction

Compiling transformation metadata file entityframework.dll could not be found, this issue turns out while our answer indicating entityframework.dll on wrong area. It needs correct to right location. I have clarified all strides one by one after way. Prior I have as of now clarified substance system mistake. Earlier I have already explained entity framework error Store update insert or delete statement affected an unexpected number of rows (0).

Error Description

Error 1 Compiling transformation: Metadata file 'C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE..\IDE\EntityFramework.dll' could not be found F:\EF\WebApplication1\WebApplication1\Model1.tt 1 1 WebApplication1

Saturday

Exception: System Data Entity Infrastructure DbUpdateException

Introduction

I was engaged on MVC application utilisation Entity Framework, MVC and Jquery. I hit the Save button to save corresponding values into database, however this did,'t happen fine as common, I got the special error An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException' occurred in EntityFramework.dll but was not handled in user code.

Error Description

An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException' occurred in EntityFramework.dll but was not handled in user code

Solution I

When I started operating to resolve issue, debugging deeply and found of stack trace message then I found that this issue was because of database table identity off.

Table Identity off

I simply set table Identity on and once more tried to save relevant values into database, this time it worked fine for me.
Table Identity On


Solution II

This Error A special case of sort An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException' occurred in EntityFramework.dll but was not handled in user code yet was not took care of in client code likewise comes when duplicte value entering in primary key so you have to cross check to conquer this mistake.

Need to Refresh Entity Framework Model After Database Change

Once you set primary key in database then when you would like to refresh your entity framework model through front end code.

Conclusion

Another superb expertise of MVC, Entity Framework, Jquery application. Every time, in each new application usually comes new problems. From these issues, we learnt another lesson each time and smoothing approach to next time. Above, I have clarified in subtle element by what method would we be able to determine issue of A special case of sort An exception of type 'System.Data.Entity.Infrastructure.DbUpdateException' occurred in EntityFramework.dll but was not handled in user code. In the event that despite everything you locate the same issue, kindly keep in mind to think of me here.

Suggested Reading

Sunday

Error CS1963: An expression tree may not contain a dynamic operation

Introduction

I was working on a MVC Application (Razor Engine) using with Entity Framework. I triggered an error not able to populate entities while binding the controls with the database. I have written below detail of error as follows:

Error Description

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS1963: An expression tree may not contain a dynamic operation

TempData vs ViewData vs ViewBag

Introduction

Today, I am explaining about TempData vs ViewData vs Viewbag while working in MVC. Each one of the three (TempData, ViewData, ViewBag) terms are used to pass data from controller to View. These all have differing capacity to shield data while going from Controller to View using MVC application. In my recent articles, Explained thoroughly How to send SMS using C# and How to create charts using MVC

ViewBag

  1. ViewBag is used logically to pass the data from controller to view.
  2. It is being introduced since C# 4.0 .Net Framework.
  3. ViewData is property of ControllerBase Class from .Net Framework 4.5 C# first time.
  4. ViewBag life reach is short. It just lies under current requesting.
  5. If it redirects then its value becomes null.
  6. It doesn't required to typecasting for getting data from Controller to View.
  7. ViewBag is slower than ViewData.

Jquery Validation: Email Validation using Jquery

Introduction

This is my second post on Jquery Validation, In my previous post, I explained in detail about Numeric Validation using Jquery, now I am going to explain about Email Validation using Jquery.

Input Box to input Email




Jquery Validation: Numeric Validation using Jquery

Introduction

Today, I am going to explain about numeric validation using Jquery. Jquery plays a great role to validate data at client side without refreshing whole the page. To make your application more user friendly, interactive and soothing then Jquery plays a vital role to fulfill your dreams.
Data Input Text Box

Number :  

Saturday

Entity Framework Examples: Entity Framework Code First Examples

Introduction

Entity Framework is an ORM (Object Relational Mapper) which enables to developer cut off code lines. ADO.Net Entity Framework is now every C#/VB apps necessity to use in MVC, ASP.Net, and Windows applications etc. Here is explained operations with code first approach.
Main Operations (CRUD) in Entity Framework is demonstrated below with code snippet.

Pre-Requisites

If you need these snippet into your machine then require following VS 2012/2013, .Net Framework 4.5 and MS SQL Server.

Installing EF NuGet Package

Right click on Reference folder of your respective project to install Entity Framework NuGet Package and select "Manage NuGet Packages"

Installing through Package Manger Console

Alternatively, you can install Entity Framework  through Package Manger Console.
PM> Install-Package EntityFramework

Download Latest Entity Framework

Here is an official link https://www.nuget.org/packages/EntityFramework/ where you can download latest Entity Framework package.

Entity Framework Version History

Here is the complete story of all Entity Framework Versions. Top most in the list are latest versions.

EntityFramework 7.0.0-beta4
EntityFramework 6.1.3 (this version)
EntityFramework 6.1.3-beta1
EntityFramework 6.1.2
EntityFramework 6.1.2-beta2
EntityFramework 6.1.2-beta1
EntityFramework 6.1.1
EntityFramework 6.1.1
EntityFramework 6.1.0
EntityFramework 6.1.0
EntityFramework 6.1.0
EntityFramework 6.0.2
EntityFramework 6.0.2
EntityFramework 6.0.1
EntityFramework 6.0.0
EntityFramework 6.0.0-rc1
EntityFramework 6.0.0-beta1
EntityFramework 6.0.0-alpha3
EntityFramework 6.0.0-alpha2
EntityFramework 6.0.0-alpha1
EntityFramework 5.0.0
EntityFramework 5.0.0-rc
EntityFramework 5.0.0-beta2
EntityFramework 5.0.0-beta1
EntityFramework 4.3.1
EntityFramework 4.3.0
EntityFramework 4.3.0-beta1
EntityFramework 4.2.0
EntityFramework 4.1.10715
EntityFramework 4.1.10331
EntityFramework 4.1.10311

USE EntityFramework connection in ADO.Net Connection

Use Namespace

using System.Data.EntityClient

Use following code snippet to use Entity Framework connection in ADO.Net Connection

string _entityConnString = ConfigurationManager.ConnectionStrings["db_MyDatabase"].ConnectionString;
string _AdoConnString = new EntityConnectionStringBuilder(_entityConnString).ProviderConnectionString;

How to take Maximum Table ID in Database Table using Entity Framework

_context is object of Entity Framework dbContext

Entity Framework dbContext

Delclaring Object of dbContext

Model1 _context = new Model1();
Int32 _TopicIDFK = _context.myTable.Select(x => x.TableID).Max();

How to Delete Records from Database table using Enity Framework

var _item = (from c in _context.mytable.where(x=> x.id = 10) select c).FirstOrDefault();
_context.tblmyTable.Attach(_item);
_context.tblmyTable.Remove(_item);
_context.SaveChanges();

How to Save Records in Database Table using Entity Framework

var _obj = new tblmyTable();
_obj.TableID = 0;
_obj.Name = txtName.Text.Trim();
_context.tblmyTable.Add(_obj);
_context.Entry(_obj).State = EntityState.Added;
_context.SaveChanges();

How to Update/Modify Records in Database Table using Entity Framework

var _obj = new tblmyTable();
_obj = (from c in _context.tblmyTable.Where(x => x.ID == 10) select c).FirstOrDefault();
obj.ID = 10;
_obj.Name = txtName.Text.Trim();

_context.tblmyTable.Add(_obj);
_context.Entry(_obj).State = EntityState.Modified;
_context.SaveChanges();
How to Check Existing Records from database Table using Entity Framework
bool existsOption = _dtOptions.Select().ToList().Exists(row => row["Options"].ToString() == "technology");

How to run ADO.Net SQL Query using Entity Framework

string _sql = "select * from tblmyTable where ID in (" + _ids + ")";
var _img = _context.Set().SqlQuery(_sql);

How to take First Value from Database Table using Entity Framework

_IdQues = _context.tblmyTable.Select(u => u.QuestionIDPK).First();

How to count number of records using Entity Framework

_countQues = _context.tblmyTable.Where(u => u.ClassIDFK == _class && u.SubjectIDFK 
== _subject && u.ChapterIDFK == _chap && u.QuizIDFK == _quiz && u.isRecStatus == true).Count();

Rename Column Name in Database Table using Entity Framework

var query = (from c in _context.tblmyTable.Where(x => x.ID > 5).OrderBy(x => x.CountryIDPK)
 select new {Code = c.CountryIDPK, c.CountryName }).ToList();

Distinct: How to take Distinct Records from database Table using Entity Framework

var result = EFContext.TestAddresses.Select(m => m.Name).Distinct();

Pattern Matching: How to Pattern Matching using Entity Framework

var _results = from a in mycontainer.users where a.fullname.Contains(mySearchText) select a.fullname;

Join:How to join Multiple tables in Entity Framework 

I have provided here how to join multiple table using Entity Framework.

var query = (from A in _context.tblA
                 join B in _context.tblB on A.TablePk equals B.TableFK
                join C in _context.tblC on A.TablePK equals C.TableFK
                where (A.Amount >0) && (B.IsRecStatus == true) && (C.IsRecStatus == true)
                orderby A.Col1, B.Col1, C.Col1
                select new { A.tblPK, B.Col1, C.Col1, A.Col1, B.Col2, C.Col1 }).ToList();

Not In: Not In Statement using EntityFramework

Int32[] CityIDFK = {10,20,30}
var _lst = (from c in _context.tblDemo TableIDPK.Any(m => m == c.CityIDFK) select c).ToList();

Random Rows: How to pick random rows using Entity Framework

var _randomRows = (from c in _context.tblOrders.OrderBy(y => Guid.NewGuid()).Take(7) select c).ToList();

Summary

Entity Framework provides developer to code access capability so eliminate code lines. Now every .net framework (c#, Vb.net) developer is primary requirement to use Entity Framework in your application (MVC, ASP.Net, Windows applications). Major operations (CRUD) , count records, Maximum number in table, Column Rename etc of Entity Framework are explained above with coding snippet in great depth.

Suggested Reading

Friday

Entity Framework Error: Validation failed for one or more entities

Introduction

While running on C# app using Entity Framework, me came me the issue Validation failed for one or more entities. Today, I've prepared a whole solution to conquer issue Validation failed for one or more entities while playing with Entity Framework (MS SQL Server database) using C#, MVC, ASP.Net, VN.net etc. Recently, I've absolutely explained entity framework error Store update insert or delete statement affected an unexpected number of rows (0)  in my recent article, this day going to resolve another one entity framework error Validation failed for one or more entities.

Sunday

SMTP Server: Authentication the Server Response was 5.5.1 Authentication required in gmail

Introduction

I was working on MVC (C#) application sending email through Gmail Server, meanwhile popped up me issue the server response was 5.5.1 authentication required, So we required action to set on security issue which is default off in Gmail Email settings. I have published an article on How to send SMS using C#, now a days it has become very necessary to integrate SMS API into our application.

Error Description

An exception of type 'System.Net.Mail.SmtpException' occurred in System.dll but was not handled in user code
Additional information: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.

Tuesday

Internet Browser: Internet Explorer replacing with Microsoft Edge in Windows 10

Introduction

Microsoft has initiated replacing Internet Explorer with Microsoft Edge in Windows 10 operating System. Microsoft Edge is totally skilled to run web applications consistently over numerous gadgets. Microsoft Edge is tad bit lighter to different programs (Chrome, Firefox, Opera and so forth.). In this article has shown difference between internet explorer vs microsoft edge.

Cutting off ActiveX and BHOs

ActiveX are dropping off by new look of Microsoft Edge substituting of old Internet Explorer.
ActiveX contains essentially module of Flash, Silver light, Java and PDF modules. Fundamental motivation to dropping off ActiveX is to fall off completely of HTML 5 of today splendid interest to run the substance over web program over the numerous gadgets.
Presently flash will work alike same as Chrome gives, now Microsoft Edge will organize PDF in its local dialect.

SQL Error: Saving Changes not permitted in SQL Server

Introduction

Today, I am explaining about error saving Changes is not permitted in MS SQL Server, to authorize this permission you have to un-check check box under Tools >> Options menus. If we keep it checked then it will not allow us to change data type during the development so that we require to frequent change or specific requirement then we required it immediately.

Error Description

Saving changes is 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.

Saving Changes not permitted in SQL Server

Saturday

RDLC reports in C#

Introduction

Here is disclosed in point of interest to create RDLC reports in C#, RDLC is great business insight (BI) instrument. RDLC is the best part to show reports in tabular form.

Step 1: Add new project, select Windows Desktop, then select Windows Forms Application and afterwards solution name and then lastly hit on OK button.

Create Solution for RDLC Report

The underlying provider failed on open

Introduction

I am now providing resolution of The underlying provider failed on open problem whenever we are working on across the network. If you see inner exception message then you'll caught in below error description in detail. This problem comes often when we are working with Entity Framework with MVC, ASP.Net, Windows Forms, WPF etc. This issue can be encountered in noticed scenarios. I've also written in detail associated with issue  Could not open a connection to SQL Server.

Error Description

{"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)"}

Friday

DataTable in C#

Introduction

DataTable is formed with rows and columns, it stored the data in the same way as stored others objects in C#.

Namespace

If we are dealing with DataTable in C# then we require to define following Namespace in our C# program.

using System;

using System.Data;

Here demonstrating to get columns name from a DataTable.

private void Get_Column_name()
{
            // Declare data table
            DataTable _ dtTC = new DataTable();
             
          // get column name using with foreach loop
           foreach(DataColumn _Cols in _dtTC.Columns)
            {
                string _str_Col_name = _Cols.ColumnName;
            }

}

DataTable In C#

Another method to select data from a specific DataTable in C#.

        private void Select_Data_From_Datatable_In_CSharp()
        {
            // Declare data table
            DataTable _dtSelectTC = new DataTable();

            // add column to data table
            _dtSelectTC.Columns.Add("ID", typeof(Int32));

            // adding rows to data table
            _dtSelectTC.Rows.Add(10);
            _dtSelectTC.Rows.Add(20);
            _dtSelectTC.Rows.Add(30);
            _dtSelectTC.Rows.Add(40);
            _dtSelectTC.Rows.Add(50);

            // filtering data on demand
            DataRow[] _resultTc = _dtSelectTC.Select("ID > 30");

            // Display results
            foreach (DataRow _rowTc in _resultTc)
            {
                Console.Write(_rowTc[0] + "\n");
            }

            // Output
            // 40
            // 50
        }

Conclusion

I have explained in detail about DataTable in C#, it uses system.Data to define DataTable and further uses of its properties, constraints etc. We can use “Clear “ method to clear data from DataTable, “Clone” helps us to cloning of a DataTable with structure and data, “Copy” copies its data with schema.

Suggested Reading:



Thursday

ArrayList in C#

Introduction

Today, I bet to throw light on ArrayList in C#. ArrayList has great feature because it can increase and decrease its size dynamically. ArrayList accepts also null value, moreover it allows to add duplicate values.

Namespace:

using System.Collections;
using System;