I need to display the column names from table in the dropdownlist of the application. How to display columns of table from database to application using c#?
prasishiva
0
Newbie Poster
Recommended Answers
Jump to Postprivate void Form1_Load(object sender, EventArgs e) { //SQL Connection String Modify with Your Data Source and DataBase Name string con = "Data Source = Flower-PC;Initial Catalog = Schooldata ; Integrated Security = True"; // Create Connection SqlConnection cn = new SqlConnection(con); DataTable dt = new DataTable(); …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.