About 818,000 results
Open links in new tab
  1. c# - Select query to get data from SQL Server - Stack Overflow

    Jul 15, 2015 · You can use the ExecuteNonQuery to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to …

    Missing:

    • Visual Studio

    Must include:

  2. How to directly execute SQL query in C#? - Stack Overflow

    Jan 18, 2019 · To execute your command directly from within C#, you would use the SqlCommand class. Quick sample code using paramaterized SQL (to avoid injection attacks) …

  3. select clause - C# reference | Microsoft Learn

    Mar 30, 2024 · In a query expression, the select clause specifies the type of values that will be produced when the query is executed. The result is based on the evaluation of all the previous …

    Missing:

    • Visual Studio

    Must include:

  4. c# - How to run SQL Query in Visual Studio based on customer …

    You'll need to create a SqlConnection and a SqlCommand to execute your SQL from C#. conn.Open(); using( SqlCommand command = new SqlCommand( "your select statement", …

  5. How to Select Query for Database in C# - Delft Stack

    Feb 2, 2024 · A complete programming tutorial about setting-up database connections and retrieving records using SELECT query in C#.

    Missing:

    • Visual Studio

    Must include:

  6. Querying SQL Server Tables from .NET - MSSQLTips.com

    Nov 14, 2018 · In this tip, we are going to see how to query SQL Server tables from .NET, get the results, and process them. More specifically, we are going to continue and further develop the …

  7. Use Visual Studio with .NET and C# to Query - Azure SQL …

    Jan 15, 2025 · This quickstart shows how to use the .NET and C# code in Visual Studio to query a database in Azure SQL or Synapse SQL with Transact-SQL statements. To complete this …

  8. Using C# to connect to and query from a SQL database

    Nov 2, 2014 · Use C# to query data from a SQL Server database using ADO.NET and best practices with SqlConnection, SqlCommand and SqlDataReader.

  9. Tutorial: Writing LINQ Queries - C# | Microsoft Learn

    Apr 25, 2024 · In this tutorial, you create a data source and write several LINQ queries. You can experiment with the query expressions and see the differences in the results. This walkthrough …

  10. Data Fetching From Microsoft SQL To C# - C# Corner

    Write the connection string given below and write a select query for the SQL command. con = new SqlConnection(@ "data source=DESKTOP-LH8CQ3P\SQLEXPRESS02;initial …

Refresh