I want to make bulk query using textbox. How can I make batch queries entered in textbox that is separated by comma?
Bulk query
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
I want to make bulk query using textbox. How can I make batch queries entered in textbox that is separated by comma?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted May 2, 2023, 11:58 PM EDT
Try this
// Get the queries entered in the Textbox control string[] queries = textBox1.Text.Split(','); // Loop through the queries and execute each one foreach (string query in queries) { // Execute the query and retrieve the results // using a database connection object // ... }Mehmet FatihRank #1,474 · 1.1K reputationPosted May 3, 2023, 4:04 AM EDT
Thanks a lot for your interest, Amit Mohantty. The code works fine.