Board index » delphi » Open datasets & web

Open datasets & web

I have what should be a simple question, but I can't seem to find much on
it. I'm working on an isapi which references IB occasionally for user login
information. I was wondering, would it be preferable to leave the dataset
open perpetually or to close it immediately after each request?

Thanks in advance;
-Hyrum

 

Re:Open datasets & web


Quote
Hyrum Paulsen wrote:

> I have what should be a simple question, but I can't seem to find much on
> it. I'm working on an isapi which references IB occasionally for user login
> information. I was wondering, would it be preferable to leave the dataset
> open perpetually or to close it immediately after each request?

        You cannot leave an IB transaction open in perpetuity.  Therefore, you
must either close the transaction and restart it the next time you need
data, or you must buffer the data in something not constrained by the
transaction context.  Choose the former option if the data changes
frequently, and choose the latter option if the data never changes.  A
TClientDataset is an ideal buffer when you need one.

        HTH,

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Other Threads