How do you view all the data from a database when running a program?

Recommended Answers

Each requirement I've outlined needs to be done. Are you familiar with how to do any of that?

  1. Set up a connection to the database
  2. Query the database
  3. Run the program
Jump to Post

All 2 Replies

Each requirement I've outlined needs to be done. Are you familiar with how to do any of that?

  1. Set up a connection to the database
  2. Query the database
  3. Run the program
You first create an object link to the data class :
       cData obj = new cData();
       GridView1.DataSource = obj.MethodName();**
       GridView1.DataBind();
       ** MethodName() refers to a method in the data class that is connecting to the       database
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.