Looking for method for fast Data loading

Umen
07-18-2003, 01:37 AM
Hello
(note i dont know if this post belong to here.. feel free to move it)
i have simple application that getting its data like combobox items , treeview items , some listboxs
from database data , now the thing is that when the application loads its takes lots of resources to read every time
the data from the db , i was wandering if there is better way ...some kind of catch system or somekind of data structure
i can use and make the loading time much faster ..
thanks

SpaceFrog
07-18-2003, 02:33 AM
Difficult to give you a better way than yours as you don't give us any info on your method ...

Nevertheless, I guess you are talking about some kind of .ini file that contains the set up for your app...
If the quantity of data to load is not too important search elements on Getsetting and Savesetting that uses reg keys...

Umen
07-18-2003, 03:05 AM
Hello
tnx for the fast replay ..
well i dont have any special method then load every time the data from the db .. yes i know its not
the best/fast way , can you expand more about saving configuration in *.ini files ?
maybe some links ?
and no i have no idea about "elements on Getsetting and Savesetting that uses reg keys..."
can you give me some more info/links about that ? and for what it used to ?
thanks

SpaceFrog
07-18-2003, 03:19 AM
Here is a bit of code that will help you inderstand getsetting and save setting...
Private Sub Form_Load()
Me.Top = GetSetting("UtilNUM", "Setup", "BaseFormTop", InitTop)
Me.Left = GetSetting("UtilNUM", "Setup", "BaseFormLeft", InitLeft)
End Sub

Private Sub Form_Unload(Cancel As Integer)
SaveSetting "UtilNUM", "Setup", "BaseFormTop", BaseForm.Top
SaveSetting "UtilNUM", "Setup", "BaseFormLeft", BaseForm.Left
End Sub

Umen
07-18-2003, 04:31 AM
OK
tnx for the tip , but i don't think i would like to register something to the registry
i have question .. if i load the info from *.ini file is it faster then loading it from local application db?
p.s
can you point me to some link about using *.ini file in the application?
thanks

SpaceFrog
07-18-2003, 07:26 AM
I just use plain textfiles that i name with a .ini extension
In those files I store either one inof by line or persoanl types.

On opening my app I just open the text file and retrieve information...


When you say DB, do you mean you have to connect before retrievong data ? This may be the reason of slow loadings ???

Umen
07-18-2003, 10:39 AM
yes it connects the db , but again its local db (access)
is there special functions dealing with *.ini files or just the same read/write functions?
thanks

Optikal
07-18-2003, 11:52 AM
connecting to a local db should be plenty fast. Using raw files will be a bit more efficient but is more complicated and makes for messier and more verbose coding. If you insist on using raw files may I suggest using XML and using the MSXML library to handle the parsing.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum