c# - How to open a database in asp.net web forms? -


I need to open a pre-existing database in C # with ASP.NET web form is. How to do the new database and how to create a table I <...

If anyone knows how to do this, please let me know. >

Thank you

  1. Open connection to the database. You will need the proper connection string The place to go is

    SqlConnection conn = new SqlConnection (yourConnectionString);

  2. Create a command

      string yourSQL = "SELECT FirstName FROM employees";           Perform a DataReader  
  3. Fill out a table with a data adapter

    This is the basic pattern.

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -