| | |
Counting instances of a value in DB
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 29
Reputation:
Solved Threads: 0
I need to query a database of application titles and count the instances of each title. I've already got a list<string> of distinct values from a previous query, and now I need to count how many times each value occurs. I'm not sure if the query is correct, or how to handle the output. So far I have:
C# Syntax (Toggle Plain Text)
SqlCommand appCommand = new SqlCommand("select count(title) from poss_titles where title = @thisTitle", appConnection); appCommand.Parameters.AddWithValue("@thisTitle", cands[i]); SqlDataReader reader; reader = appCommand.ExecuteReader();
Last edited by benkyma; Oct 9th, 2009 at 8:46 am.
•
•
Join Date: Sep 2009
Posts: 29
Reputation:
Solved Threads: 0
0
#2 Oct 9th, 2009
Answer found here:
http://www.daniweb.com/forums/thread228839.html
http://www.daniweb.com/forums/thread228839.html
![]() |
Similar Threads
- Loop counting odd and even numbers (C++)
- counting lesson(for the slow among us) (Posting Games)
- Need Help counting Array Length (C++)
- Counting post count (Growing an Online Community)
Other Threads in the C# Forum
- Previous Thread: Comparing values inside TextBoxes( which is present inside a GridView)
- Next Thread: Splitting of wav files
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime decryption degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest i18n image imageprocessing index input install java label list listbox listener mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer update uploadatextfile usercontrol users validation view visualstudio webbrowser whileloop windows winforms wpf xml





