Re: [sqlite] Populating and scrolling the Listbox using query
That seems like it would cut down on some of your query times. When you say it's running slow, how slow are you talking about? Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neville Franks Sent: Tuesday, April 22, 2008 1:08 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Populating and scrolling the Listbox using query Tuesday, April 22, 2008, 2:52:37 PM, you wrote: Why not just keep the rowid's in an array and query the actual row contents as needed. This is typical with virtual list or tree controls. That is you keep a reference to the data, not the data itself. F> Thanks for the quick reply Epankoke. F> We tried as you mentioned. But we are restricted with the memory size and F> the storage of the needed data occupies some MB's of space in the memory so F> we cannot go for it. Is there any other work around to perform the scrolling F> condition. F> Kindly help in this regard. F> Regards, F> Farzana. F> epankoke wrote: >> >> Is it possible to store all of the needed data in memory? If so, why not >> read the required information into an array and just update an index >> variable to keep track of where you are at in the array when the user >> clicks the up and down buttons? That should be quite fast. >> >> -- >> Eric Pankoke >> Founder / Lead Developer >> Point Of Light Software >> http://www.polsoftware.com/ >> >> -- Original message -- >> From: Farzana <[EMAIL PROTECTED]> >>> >>> Thanks for your reply Igor. >>> >>> We tried populating the listbox as mentioned in the URL.We are successful >>> in >>> populating the listbox but when we go for scrolling the data, it takes >>> more >>> time to move forward and backward since it has to execute the query >>> everytime. We are using a PocketPc so it is much slower. Is there any >>> other >>> way to do this or can some one provide us a sample code for the same. >>> We are using a Table say Employees where we have to dsiplay their Job >>> Description in ascending order in a user defined listbox with scroll up >>> and >>> scroll down buttons. Can anyone provide us a suggestion. >>> Thanks in Advance. >>> >>> Regards, >>> Farzana >>> >>> >>> >>> Igor Tandetnik wrote: >>> > >>> > "Farzana" <[EMAIL PROTECTED]> >>> > wrote in message news:[EMAIL PROTECTED] >>> >> We are working in eVC++ environment with SQLite database.We need to >>> >> populate the listbox with the values obtained by executing the query. >>> >> We were able to get the values of the query by using the API's >>> >> sqlite3_prepare and sqlite3_step. >>> >> But we were able to populate and move the listbox in the downward >>> >> direction only >>> > >>> > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor >>> > >>> > Igor Tandetnik >>> > >>> > >>> > >>> > ___ >>> > sqlite-users mailing list >>> > sqlite-users@sqlite.org >>> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-t p1667617 >>> 8p16806114.html >>> Sent from the SQLite mailing list archive at Nabble.com. >>> >>> ___ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> -- Best regards, Neville Franks, http://www.surfulater.com http://blog.surfulater.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Tuesday, April 22, 2008, 2:52:37 PM, you wrote: Why not just keep the rowid's in an array and query the actual row contents as needed. This is typical with virtual list or tree controls. That is you keep a reference to the data, not the data itself. F> Thanks for the quick reply Epankoke. F> We tried as you mentioned. But we are restricted with the memory size and F> the storage of the needed data occupies some MB's of space in the memory so F> we cannot go for it. Is there any other work around to perform the scrolling F> condition. F> Kindly help in this regard. F> Regards, F> Farzana. F> epankoke wrote: >> >> Is it possible to store all of the needed data in memory? If so, why not >> read the required information into an array and just update an index >> variable to keep track of where you are at in the array when the user >> clicks the up and down buttons? That should be quite fast. >> >> -- >> Eric Pankoke >> Founder / Lead Developer >> Point Of Light Software >> http://www.polsoftware.com/ >> >> -- Original message -- >> From: Farzana <[EMAIL PROTECTED]> >>> >>> Thanks for your reply Igor. >>> >>> We tried populating the listbox as mentioned in the URL.We are successful >>> in >>> populating the listbox but when we go for scrolling the data, it takes >>> more >>> time to move forward and backward since it has to execute the query >>> everytime. We are using a PocketPc so it is much slower. Is there any >>> other >>> way to do this or can some one provide us a sample code for the same. >>> We are using a Table say Employees where we have to dsiplay their Job >>> Description in ascending order in a user defined listbox with scroll up >>> and >>> scroll down buttons. Can anyone provide us a suggestion. >>> Thanks in Advance. >>> >>> Regards, >>> Farzana >>> >>> >>> >>> Igor Tandetnik wrote: >>> > >>> > "Farzana" <[EMAIL PROTECTED]> >>> > wrote in message news:[EMAIL PROTECTED] >>> >> We are working in eVC++ environment with SQLite database.We need to >>> >> populate the listbox with the values obtained by executing the query. >>> >> We were able to get the values of the query by using the API's >>> >> sqlite3_prepare and sqlite3_step. >>> >> But we were able to populate and move the listbox in the downward >>> >> direction only >>> > >>> > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor >>> > >>> > Igor Tandetnik >>> > >>> > >>> > >>> > ___ >>> > sqlite-users mailing list >>> > sqlite-users@sqlite.org >>> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-tp1667617 >>> 8p16806114.html >>> Sent from the SQLite mailing list archive at Nabble.com. >>> >>> ___ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> -- Best regards, Neville Franks, http://www.surfulater.com http://blog.surfulater.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Thanks for the quick reply Epankoke. We tried as you mentioned. But we are restricted with the memory size and the storage of the needed data occupies some MB's of space in the memory so we cannot go for it. Is there any other work around to perform the scrolling condition. Kindly help in this regard. Regards, Farzana. epankoke wrote: > > Is it possible to store all of the needed data in memory? If so, why not > read the required information into an array and just update an index > variable to keep track of where you are at in the array when the user > clicks the up and down buttons? That should be quite fast. > > -- > Eric Pankoke > Founder / Lead Developer > Point Of Light Software > http://www.polsoftware.com/ > > -- Original message -- > From: Farzana <[EMAIL PROTECTED]> >> >> Thanks for your reply Igor. >> >> We tried populating the listbox as mentioned in the URL.We are successful >> in >> populating the listbox but when we go for scrolling the data, it takes >> more >> time to move forward and backward since it has to execute the query >> everytime. We are using a PocketPc so it is much slower. Is there any >> other >> way to do this or can some one provide us a sample code for the same. >> We are using a Table say Employees where we have to dsiplay their Job >> Description in ascending order in a user defined listbox with scroll up >> and >> scroll down buttons. Can anyone provide us a suggestion. >> Thanks in Advance. >> >> Regards, >> Farzana >> >> >> >> Igor Tandetnik wrote: >> > >> > "Farzana" <[EMAIL PROTECTED]> >> > wrote in message news:[EMAIL PROTECTED] >> >> We are working in eVC++ environment with SQLite database.We need to >> >> populate the listbox with the values obtained by executing the query. >> >> We were able to get the values of the query by using the API's >> >> sqlite3_prepare and sqlite3_step. >> >> But we were able to populate and move the listbox in the downward >> >> direction only >> > >> > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor >> > >> > Igor Tandetnik >> > >> > >> > >> > ___ >> > sqlite-users mailing list >> > sqlite-users@sqlite.org >> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-tp1667617 >> 8p16806114.html >> Sent from the SQLite mailing list archive at Nabble.com. >> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-tp16676178p16821712.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Is it possible to store all of the needed data in memory? If so, why not read the required information into an array and just update an index variable to keep track of where you are at in the array when the user clicks the up and down buttons? That should be quite fast. -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -- Original message -- From: Farzana <[EMAIL PROTECTED]> > > Thanks for your reply Igor. > > We tried populating the listbox as mentioned in the URL.We are successful in > populating the listbox but when we go for scrolling the data, it takes more > time to move forward and backward since it has to execute the query > everytime. We are using a PocketPc so it is much slower. Is there any other > way to do this or can some one provide us a sample code for the same. > We are using a Table say Employees where we have to dsiplay their Job > Description in ascending order in a user defined listbox with scroll up and > scroll down buttons. Can anyone provide us a suggestion. > Thanks in Advance. > > Regards, > Farzana > > > > Igor Tandetnik wrote: > > > > "Farzana" <[EMAIL PROTECTED]> > > wrote in message news:[EMAIL PROTECTED] > >> We are working in eVC++ environment with SQLite database.We need to > >> populate the listbox with the values obtained by executing the query. > >> We were able to get the values of the query by using the API's > >> sqlite3_prepare and sqlite3_step. > >> But we were able to populate and move the listbox in the downward > >> direction only > > > > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor > > > > Igor Tandetnik > > > > > > > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > View this message in context: > http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-tp1667617 > 8p16806114.html > Sent from the SQLite mailing list archive at Nabble.com. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Thanks for your reply Igor. We tried populating the listbox as mentioned in the URL.We are successful in populating the listbox but when we go for scrolling the data, it takes more time to move forward and backward since it has to execute the query everytime. We are using a PocketPc so it is much slower. Is there any other way to do this or can some one provide us a sample code for the same. We are using a Table say Employees where we have to dsiplay their Job Description in ascending order in a user defined listbox with scroll up and scroll down buttons. Can anyone provide us a suggestion. Thanks in Advance. Regards, Farzana Igor Tandetnik wrote: > > "Farzana" <[EMAIL PROTECTED]> > wrote in message news:[EMAIL PROTECTED] >> We are working in eVC++ environment with SQLite database.We need to >> populate the listbox with the values obtained by executing the query. >> We were able to get the values of the query by using the API's >> sqlite3_prepare and sqlite3_step. >> But we were able to populate and move the listbox in the downward >> direction only > > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor > > Igor Tandetnik > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://www.nabble.com/Populating-and-scrolling-the-Listbox-using-query-tp16676178p16806114.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Farzana wrote: > Dear All, > > We are working in eVC++ environment with SQLite database.We need to populate > the listbox with the values obtained by executing the query. > We were able to get the values of the query by using the API’s > sqlite3_prepare and sqlite3_step. > But we were able to populate and move the listbox in the downward direction > only and we couldn’t get the correct result when we click the upward > direction button of the listbox.Is there any API or functions available to > move the data in upward direction in the listbox? > > We happened to come across the functions of BTree such as > sqlite3BtreePrevious, sqlite3BtreeNext where we are suppose to use cursors. > Is it possible to execute the query using cursors and move the pointer in > the upward or downward direction? Farzana, Moving the list control has nothing to do with SQLite, that's a function of your interface code. I have a couple of solutions that I use for dealing with grids and list controls in general. The first is to maintain a shadow store behind the scenes with the data from my database records. In particular, I define a class to hold a record. My screen has a vector of these classes. So when the user makes changes to row 3 of the list control, behind the scenes I make those changes to item 3 of the vector. In fact I find this easiest to do by deriving a specialized list control that deals with this particular view on the data. Another approach is to record the primary key with each row of the list control. This works fine if you don't allow in-place editing, and the users will only be adding or deleting records (or their edits occur on a different screen). Clay ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
Might want to download the free source for the Delphi VCL set for Sqlite DB access componenets provided at Aducom.com and review the releven source code. Sorry, it is written that highly "inelegant" Object Pascal. But I'm an old "C" coder from way back and do read and write Object Pascal more so than "C". Just think of it as a wordy "C" without a real need for those pesky pointers. I have never looked that deep in that particular area of the source so have no direct suggestions. I just let Delphi VCL's do the scrolling in either direction. Fred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Igor Tandetnik Sent: Monday, April 14, 2008 6:36 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Populating and scrolling the Listbox using query "Farzana" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > We are working in eVC++ environment with SQLite database.We need to > populate the listbox with the values obtained by executing the query. > We were able to get the values of the query by using the API's > sqlite3_prepare and sqlite3_step. > But we were able to populate and move the listbox in the downward > direction only http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Populating and scrolling the Listbox using query
"Farzana" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > We are working in eVC++ environment with SQLite database.We need to > populate the listbox with the values obtained by executing the query. > We were able to get the values of the query by using the API's > sqlite3_prepare and sqlite3_step. > But we were able to populate and move the listbox in the downward > direction only http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users