Click here to Skip to main content
15,888,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow do I use ErrorProvider with a bound UserControl? (WinForms) Pin
GroupIII20-Feb-14 17:46
GroupIII20-Feb-14 17:46 
AnswerRe: How do I use ErrorProvider with a bound UserControl? (WinForms) Pin
Eddy Vluggen20-Feb-14 22:30
professionalEddy Vluggen20-Feb-14 22:30 
Question100,000 Items in Check ListBox result in slow performance Pin
Arun Peswani19-Feb-14 7:04
Arun Peswani19-Feb-14 7:04 
AnswerRe: 100,000 Items in Check ListBox result in slow performance Pin
Eddy Vluggen19-Feb-14 8:11
professionalEddy Vluggen19-Feb-14 8:11 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Arun Peswani19-Feb-14 16:09
Arun Peswani19-Feb-14 16:09 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Eddy Vluggen20-Feb-14 0:29
professionalEddy Vluggen20-Feb-14 0:29 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Arun Peswani20-Feb-14 5:35
Arun Peswani20-Feb-14 5:35 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Eddy Vluggen20-Feb-14 8:45
professionalEddy Vluggen20-Feb-14 8:45 
If you got a few days, we'll take it in a few steps.

Arun Peswani wrote:
Does it help you to help me further?
Yes, familiar pattern, might actually have something similar - without dates. Can you also tell us the column-types used? I'd also like to know if there's any indexes defined on that. If yes, then we'll look at optimizing the query tomorrow.

Arun Peswani wrote:
I noticed one more thing today, creating a long string ITEMS, which I am using in above query, is also taking a very long time.
Doing a lot costs a lot. Let's see;
VB
Dim ITEMS as String = "'" & CheckListBox.Item(0) & "'"
For int i = 1 To CheckListBox.Count - 1
ITEMS = ITEMS & "'" & CheckListBox(i) & "'"
Next

VB
Private CheckListBox As New CheckedListBox
    Sub method1()
        Dim sb = New System.Text.StringBuilder() ' use stringbuilder
        For Each checkedThingy In CheckListBox.CheckedItems ' only add thing you know are checked 
                                                             ' this loop is smaller than "all rows"
            sb.AppendFormat("'{0}',", checkedThingy)
        Next
        Dim ITEMS As String = sb.ToString()
    End Sub


Arun Peswani wrote:
How do I need to convert the selected items which can be used in above query?

Ideally, we'd have a list of the keys (Id's) coming from that selection, not words. You're selecting on a varchar field?
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Arun Peswani20-Feb-14 20:55
Arun Peswani20-Feb-14 20:55 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Eddy Vluggen21-Feb-14 6:43
professionalEddy Vluggen21-Feb-14 6:43 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Arun Peswani22-Feb-14 6:57
Arun Peswani22-Feb-14 6:57 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
Eddy Vluggen24-Feb-14 7:35
professionalEddy Vluggen24-Feb-14 7:35 
GeneralRe: 100,000 Items in Check ListBox result in slow performance Pin
MyOwnBoss7-Mar-14 13:05
MyOwnBoss7-Mar-14 13:05 
AnswerRe: 100,000 Items in Check ListBox result in slow performance PinPopular
Richard MacCutchan19-Feb-14 22:09
mveRichard MacCutchan19-Feb-14 22:09 
AnswerRe: 100,000 Items in Check ListBox result in slow performance Pin
Dave Kreskowiak24-Feb-14 5:10
mveDave Kreskowiak24-Feb-14 5:10 
QuestionComboBox not receiving DataSet values? Pin
rsmldmv18-Feb-14 12:17
rsmldmv18-Feb-14 12:17 
QuestionRe: ComboBox not receiving DataSet values? Pin
Eddy Vluggen19-Feb-14 8:01
professionalEddy Vluggen19-Feb-14 8:01 
QuestionAutomatically open Hyperlink in NeoOffice (VBA?) Pin
Member 1060384017-Feb-14 9:30
Member 1060384017-Feb-14 9:30 
SuggestionRe: Automatically open Hyperlink in NeoOffice (VBA?) Pin
Richard MacCutchan17-Feb-14 21:32
mveRichard MacCutchan17-Feb-14 21:32 
GeneralRe: Automatically open Hyperlink in NeoOffice (VBA?) Pin
Member 1060384017-Feb-14 22:42
Member 1060384017-Feb-14 22:42 
GeneralRe: Automatically open Hyperlink in NeoOffice (VBA?) Pin
Richard MacCutchan18-Feb-14 2:47
mveRichard MacCutchan18-Feb-14 2:47 
Questionvb.net Pin
SURAJIT UPADHYAY15-Feb-14 0:16
SURAJIT UPADHYAY15-Feb-14 0:16 
AnswerRe: vb.net Pin
Richard MacCutchan15-Feb-14 1:42
mveRichard MacCutchan15-Feb-14 1:42 
AnswerRe: vb.net Pin
Simon_Whale17-Feb-14 22:05
Simon_Whale17-Feb-14 22:05 
QuestionLibrary not registered in excel 2013 vba Pin
Samoeurn13-Feb-14 21:41
Samoeurn13-Feb-14 21:41 

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.