About 9,900 results
Open links in new tab
  1. How to insert Records in Database using C# language?

    Aug 27, 2012 · You should form the command with the contents of the textboxes: sql = "insert into Main (Firt Name, Last Name) values(" + textbox2.Text + "," + textbox3.Text+ ")"; This, of …

  2. Insert data into SQL Server from C# code - Stack Overflow

    string sql = "insert into student(name) values (@name)"; using (SqlConnection conn = new SqlConnection(connectionString)) conn.Open(); using (SqlCommand cmd = new …

  3. Basic Database Operations Using C# - GeeksforGeeks

    Jan 31, 2023 · In this article, you are going to learn about how to perform basic database operations using system.data.SqlClient namespace in C#. The basic operations are INSERT, …

  4. How do I to insert data into an SQL table using C# as well as …

    You should use parameters in your query to prevent attacks, like if someone entered '); drop table ArticlesTBL;--' as one of the values. string query = "INSERT INTO ArticlesTBL (ArticleTitle, …

  5. Insert records into database (.NET Framework) - Visual Studio …

    Aug 26, 2024 · You can use the TableAdapter.Update method or one of the TableAdapter DBDirect methods (specifically, the TableAdapter.Insert method). This article describes how to …

  6. How to Insert Data into SQL Server Table Using C# - Web Dev Tutor

    Aug 7, 2024 · In this tutorial, we have learned how to insert data into a SQL Server table using C#. By establishing a connection, creating an insert command, and executing it, you can …

  7. Simple ADO.NET Database Read, Insert, Update and Delete using C#.

    May 31, 2001 · An easy introduction to accessing databases using the ADO classes. It includes how to read and write integers, strings and dates.

  8. C# code with namespaces to insert data into SQL Server table …

    Here’s an example C# code with namespaces to insert data into SQL Server table with textbox input: using System; using System.Data.SqlClient; using System.Windows.Forms; namespace …

  9. How to insert data in a Database in C#, SQL Server and ASP.NET

    Jun 8, 2021 · With cSharp (commonly known as C#) we can easily do ADO.NET programming to access a database, insert data into database tables, retrieve data from database tables and …

  10. SQL Insert Query in C# - Delft Stack

    Feb 16, 2024 · There are 2 main methods that can be used to insert records to a database in C#, the direct query method and the parameterized query method.

  11. Some results have been removed
Refresh