How can one search for multiple items at once and display the result in a datagrid? for example, i want to search for multiple mobile numbers (in sql server database)at once and display the found numbers and their corresponding names.
Netcode 33 Veteran Poster
Recommended Answers
Jump to Posthi chibex64
If you look at Momerath's example, there are single quotes around each phone number - '111-222-3333', '222-333-4444'. Your sql statement built by this line
"SELECT Name, Mobile FROM PHC_Contacts WHERE Mobile In '" + ListBox1.Items.ToString + "'",
will enclose the whole list in quotes.
…
All 4 Replies
Momerath 1,327 Nearly a Senior Poster Featured Poster
Netcode 33 Veteran Poster
crapulency 0 Junior Poster in Training
zx1 0 Newbie Poster
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.