Prevent from inserting duplicate records into the table
You need to check if a duplicate entry exists in table before inserting the data. I suggest you could refer to the solution given below:
Approach 1=>
using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultCSRConnection"].ConnectionString))
{
//Open your connection
conn.Open();
//Your Select Query
...
This blog related to all the experience that i gain and face during past career. It covers Microsoft technology like. Microsoft Dot Net, SQL Server, Scripting Language etc,.
Pages
Monday, December 17, 2018
Validation to Check Duplicate Records
Read More »
Monday, October 29, 2018
Converting String in to CSV files in C Sharp
Function For Creating CSV files in C#
public static string FormatCSV(string input)
{
try
{
if (input == null)
return string.Empty;
bool containsQuote = false;
bool containsComma = false;
...
Subscribe to:
Posts (Atom)
My Blog List
-
-
-
-
Kumaon University Nainital B.Ed entrance exam test result 2012 - कुमाऊँ विश्वविधालय, नैनीताल (उत्तराखण्ड)11 years ago