Click here to Skip to main content
15,912,400 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Code doessn't work Pin
Christian Graus9-Oct-05 2:56
protectorChristian Graus9-Oct-05 2:56 
QuestionCalculator Needed Pin
lcannon7-Oct-05 15:47
lcannon7-Oct-05 15:47 
AnswerRe: Calculator Needed Pin
Steve Pullan9-Oct-05 14:26
Steve Pullan9-Oct-05 14:26 
AnswerRe: Calculator Needed Pin
toxcct10-Oct-05 2:37
toxcct10-Oct-05 2:37 
Questioncounting occurences of a string in a datagrid/dataset Pin
jszpila7-Oct-05 11:24
jszpila7-Oct-05 11:24 
AnswerRe: counting occurences of a string in a datagrid/dataset Pin
Anonymous7-Oct-05 11:29
Anonymous7-Oct-05 11:29 
GeneralRe: counting occurences of a string in a datagrid/dataset Pin
jszpila7-Oct-05 11:41
jszpila7-Oct-05 11:41 
AnswerRe: counting occurences of a string in a datagrid/dataset Pin
Robert Rohde9-Oct-05 9:15
Robert Rohde9-Oct-05 9:15 
If you query it directly on the database something like the following should do the job:
SELECT NAME, COUNT(ID) FROM TableName GROUP BY NAME

If this is not possible something like this should do the job:
Dim hash As Hashtable
For Each row As DataRow In dataTable.Rows
   Dim name As String = row("NAME").ToString()
   If hash.ContainsKey(name) Then
      hash.Add(name, 1)
   Else
      hash(name) = Convert.ToInt16(hash(name)) + 1
   End If
Next

Dim result As String = ""
For Each name As String In hash.Keys
   result = name & " occured: " & hash(name).tostring() & " times"
Next

GeneralRe: counting occurences of a string in a datagrid/dataset Pin
jszpila10-Oct-05 6:06
jszpila10-Oct-05 6:06 
AnswerFixed Pin
jszpila10-Oct-05 6:25
jszpila10-Oct-05 6:25 
GeneralRe: Fixed Pin
Robert Rohde10-Oct-05 7:09
Robert Rohde10-Oct-05 7:09 
QuestionPopup Menu, Quick question Pin
No-e7-Oct-05 10:35
No-e7-Oct-05 10:35 
AnswerRe: Popup Menu, Quick question Pin
Richard_Wolf7-Oct-05 10:39
Richard_Wolf7-Oct-05 10:39 
GeneralRe: Popup Menu, Quick question Pin
No-e7-Oct-05 10:50
No-e7-Oct-05 10:50 
GeneralRe: Popup Menu, Quick question Pin
Richard_Wolf7-Oct-05 10:58
Richard_Wolf7-Oct-05 10:58 
AnswerRe: Popup Menu, Quick question Pin
Steve Pullan9-Oct-05 14:31
Steve Pullan9-Oct-05 14:31 
QuestionQuickie... Pin
No-e7-Oct-05 10:33
No-e7-Oct-05 10:33 
Questionhelp needed in handling dtmf commands and processing in visual basic Pin
Tolga Palaoglu7-Oct-05 10:32
Tolga Palaoglu7-Oct-05 10:32 
AnswerRe: help needed in handling dtmf commands and processing in visual basic Pin
Dave Kreskowiak7-Oct-05 16:51
mveDave Kreskowiak7-Oct-05 16:51 
Questioncheck box Pin
Anonymous7-Oct-05 10:17
Anonymous7-Oct-05 10:17 
AnswerRe: check box Pin
Richard_Wolf7-Oct-05 10:25
Richard_Wolf7-Oct-05 10:25 
GeneralRe: check box Pin
Anonymous7-Oct-05 10:34
Anonymous7-Oct-05 10:34 
GeneralRe: check box Pin
Richard_Wolf7-Oct-05 10:43
Richard_Wolf7-Oct-05 10:43 
GeneralRe: check box Pin
Anonymous7-Oct-05 10:49
Anonymous7-Oct-05 10:49 
GeneralRe: check box Pin
Steve Pullan9-Oct-05 14:36
Steve Pullan9-Oct-05 14:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.