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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -