Re: [sqlite] How to do: move to Next/Prev record?

2005-04-04 Thread liigo
在 Mon, 04 Apr 2005 21:11:44 +0800,Tim_Anderson <[EMAIL PROTECTED]> 写 
道:

-Original Message-
From: liigo [mailto:[EMAIL PROTECTED]
Sent: 04 April 2005 12:52
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to do: move to Next/Prev record?

> Not sure exactly what you mean here. The Sqlite API lets you step
> forward through a result set, but not back. I'm not sure how other
> wrappers do it, but in my simple Delphi wrapper
> (http://www.itwriting.com/sqlitesimple.php) I copy the data into an
> array (actually a TList) so that you can step back and forward.
> There's a trade-off between convenience and efficiency.
>
> Tim
this a a way, but maybe not the best one.
when the result set is very large, it will cost a very large
memery. (?)
That's true, though well-designed queries won't normally retrieve large
result-sets. You can use the LIMIT and OFFSET clauses in SELECT to grab
large result-sets in chunks.
Tim

You are right, thanks again!


Re: [sqlite] How to do: move to Next/Prev record?

2005-04-04 Thread Clay Dowling

liigo said:

> this a a way, but maybe not the best one.
>
> when the result set is very large, it will cost a very large memery. (?)

When the result set is very large you'd best be using a forward-only
recordset, so that really isn't an issue.  It may be best in fact to only
implement the forward only, read only recordset model, since that's what's
actually supported by the library (and most actual DB interfaces, to be
honest).

Clay Dowling
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development


RE: [sqlite] How to do: move to Next/Prev record?

2005-04-04 Thread Tim_Anderson
> -Original Message-
> From: liigo [mailto:[EMAIL PROTECTED] 
> Sent: 04 April 2005 12:52
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to do: move to Next/Prev record?

> > Not sure exactly what you mean here. The Sqlite API lets you step 
> > forward through a result set, but not back. I'm not sure how other 
> > wrappers do it, but in my simple Delphi wrapper
> > (http://www.itwriting.com/sqlitesimple.php) I copy the data into an 
> > array (actually a TList) so that you can step back and forward. 
> > There's a trade-off between convenience and efficiency.
> >
> > Tim
> 
> 
> this a a way, but maybe not the best one.
> 
> when the result set is very large, it will cost a very large 
> memery. (?)

That's true, though well-designed queries won't normally retrieve large
result-sets. You can use the LIMIT and OFFSET clauses in SELECT to grab
large result-sets in chunks.

Tim


Re: [sqlite] How to do: move to Next/Prev record?

2005-04-04 Thread liigo
在 Mon, 04 Apr 2005 19:03:59 +0800,Tim Anderson <[EMAIL PROTECTED]> 写 
道:

-Original Message-
From: liigo [mailto:[EMAIL PROTECTED]
Sent: 04 April 2005 08:58
To: sqlite-users@sqlite.org
Subject: [sqlite] How to do: move to Next/Prev record?
When wrap sqlite to anothe language,
How to do: move to Next/Prev record?
Not sure exactly what you mean here. The Sqlite API lets you step
forward through a result set, but not back. I'm not sure how other
wrappers do it, but in my simple Delphi wrapper
(http://www.itwriting.com/sqlitesimple.php) I copy the data into an
array (actually a TList) so that you can step back and forward. There's
a trade-off between convenience and efficiency.
Tim

this a a way, but maybe not the best one.
when the result set is very large, it will cost a very large memery. (?)


RE: [sqlite] How to do: move to Next/Prev record?

2005-04-04 Thread Tim Anderson
> -Original Message-
> From: liigo [mailto:[EMAIL PROTECTED] 
> Sent: 04 April 2005 08:58
> To: sqlite-users@sqlite.org
> Subject: [sqlite] How to do: move to Next/Prev record?
> 
> 
> When wrap sqlite to anothe language,
> How to do: move to Next/Prev record?

Not sure exactly what you mean here. The Sqlite API lets you step
forward through a result set, but not back. I'm not sure how other
wrappers do it, but in my simple Delphi wrapper
(http://www.itwriting.com/sqlitesimple.php) I copy the data into an
array (actually a TList) so that you can step back and forward. There's
a trade-off between convenience and efficiency. 

Tim