Click here to Skip to main content
16,004,924 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Load and unload assembly Pin
Luc Pattyn24-May-10 5:26
sitebuilderLuc Pattyn24-May-10 5:26 
GeneralRe: Load and unload assembly Pin
cstrader23224-May-10 5:42
cstrader23224-May-10 5:42 
QuestionVS 2010 - sqlexpress - connection string in wcf service Pin
nlarson1124-May-10 3:46
nlarson1124-May-10 3:46 
AnswerRe: VS 2010 - sqlexpress - connection string in wcf service Pin
Johan Hakkesteegt24-May-10 21:47
Johan Hakkesteegt24-May-10 21:47 
QuestionListView in virtualmode Pin
jtpaa24-May-10 3:43
jtpaa24-May-10 3:43 
AnswerRe: ListView in virtualmode Pin
Luc Pattyn24-May-10 5:15
sitebuilderLuc Pattyn24-May-10 5:15 
GeneralRe: ListView in virtualmode Pin
jtpaa24-May-10 6:23
jtpaa24-May-10 6:23 
GeneralRe: ListView in virtualmode Pin
Luc Pattyn24-May-10 6:31
sitebuilderLuc Pattyn24-May-10 6:31 
jtpaa wrote:
During startup data is collected into this baseArray


That means all data is in memory, and virtual mode will not bring anything.


jtpaa wrote:
Do you mean that data could be taken from the database into cache in runtime?


Yes. A very simple implementation would be to have RetrieveVirtualItem to go out and fetch one item from the database and feed it to the ListView. That way, you would not be holding any data in memory yourself, and the ListView would hold whatever it needs, and no more.

I am not saying this is the best approach, as it would cause a lot of small Database operations. There typically is an optimum somewhere in between; if you are willing to spend the effort, you could:
- create a cache, keeping a limited number of items, using WeakReference to make them garbage collectable;
- inside RetrieveVirtualItem, first look for the item in the cache; if found, pass it on. If not, read a number of items from the database, add them to the cache, and pass on the wanted one.

That is why it is called virtual: the ListView will act as if it has all data, but in reality it only has part of the data at any one point in time, sufficient to show the visible parts.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: ListView in virtualmode Pin
jtpaa24-May-10 6:59
jtpaa24-May-10 6:59 
AnswerRe: ListView in virtualmode Pin
Luc Pattyn24-May-10 7:17
sitebuilderLuc Pattyn24-May-10 7:17 
QuestionWindows 7 Cannot get Registered Owner/Organization Pin
QuickBooksDev24-May-10 2:59
QuickBooksDev24-May-10 2:59 
AnswerRe: Windows 7 Cannot get Registered Owner/Organization Pin
Dave Kreskowiak24-May-10 4:19
mveDave Kreskowiak24-May-10 4:19 
GeneralRe: Windows 7 Cannot get Registered Owner/Organization Pin
QuickBooksDev24-May-10 7:32
QuickBooksDev24-May-10 7:32 
GeneralRe: Windows 7 Cannot get Registered Owner/Organization Pin
Dave Kreskowiak24-May-10 9:02
mveDave Kreskowiak24-May-10 9:02 
GeneralRe: Windows 7 Cannot get Registered Owner/Organization Pin
QuickBooksDev16-Jun-10 3:14
QuickBooksDev16-Jun-10 3:14 
GeneralRe: Windows 7 Cannot get Registered Owner/Organization Pin
Dave Kreskowiak16-Jun-10 8:36
mveDave Kreskowiak16-Jun-10 8:36 
QuestionHow can my add-in consume events from another add-in? Pin
Sonhospa23-May-10 23:02
Sonhospa23-May-10 23:02 
AnswerRe: How can my add-in consume events from another add-in? Pin
Dave Kreskowiak24-May-10 4:13
mveDave Kreskowiak24-May-10 4:13 
GeneralRe: How can my add-in consume events from another add-in? Pin
Sonhospa24-May-10 9:20
Sonhospa24-May-10 9:20 
AnswerRe: How can my add-in consume events from another add-in? Pin
Luc Pattyn24-May-10 5:33
sitebuilderLuc Pattyn24-May-10 5:33 
GeneralRe: How can my add-in consume events from another add-in? Pin
Sonhospa24-May-10 9:08
Sonhospa24-May-10 9:08 
GeneralRe: How can my add-in consume events from another add-in? Pin
Luc Pattyn24-May-10 10:06
sitebuilderLuc Pattyn24-May-10 10:06 
QuestionBad DLL Calling Convention error when sending UDT from VB6 to Dev-C++ DLL Pin
bytelogik23-May-10 6:11
bytelogik23-May-10 6:11 
AnswerRe: Bad DLL Calling Convention error when sending UDT from VB6 to Dev-C++ DLL Pin
bytelogik23-May-10 9:21
bytelogik23-May-10 9:21 
QuestionIs Visual Studio 2010 compatible with older SQL versions Pin
Didier Cauberghe23-May-10 2:42
Didier Cauberghe23-May-10 2:42 

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.