interbase and threads

Posted on 2002-06-12
Medium Priority
Last Modified: 2012-05-04

i m doing a two-tire application in delphi 5.0 and interbase 6.0 can any body suggest me how to run interbase querys in thread. If i concurrently run two or more large queries i get the "error cannot read data from connection". I m not just opening the query in the thread but also seeking the last record in order to casch the entire data.

or a better way to casch the larger tables for lookup purposes.

Question by:ustad
LVL 27

Accepted Solution

kretzschmar earned 200 total points
ID: 7074787
>a better way to casch the larger tables for lookup purposes

memory datasets like

rxmemorydataset from the rxlib
(cannot be used as lookupsource, but as cache)

or (just today noticed) the
kbmMemoryTable at http://www.optical.dk/delphi/prod01.htm

both are free and for caching useable

also the tclientdataset may help you,
but for this oraelbis is a better expert than i
(maybe he/she joins into this q)

meikl ;-)

Assisted Solution

Motaz earned 200 total points
ID: 7074796
I encounter such problem in lower speed network connection.
Seeking the last record is a very time-consuming operation, try to find alternatives.
You can use Midas Client Data set to cache the table.
Use DataSetProvider, and ClientDataSet.
ClientDataSet is a memory table and can be saved as CDS file or XML file.


Author Comment

ID: 7077898
I would like to use some sort of a component (like client dataset or kbmmemorytable) for casching purpose. but its taking a long time to send this data to these components and threads is causing problems to me. so i would like u experts to suggest a way to achieve this.

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

LVL 27

Expert Comment

ID: 7077906
u could use a query like

select * from atable where id = (select max(id) from atable)

if this is not supported by your database then use

select * from atable where id in (select max(id) from atable)

this will return only the last record,
if id is an autoincrment,
if you have an insert-timestmap and not
so an id then use the timestamp instead

you should have an index on the field

meikl ;-)

Author Comment

ID: 7083274
No i want to casch the entire database which comes to around 100000 records.
LVL 27

Expert Comment

ID: 7083292

somewhere i thought that i read something
about a last record

well, every copy/filling needs time

meikl ;-)

Expert Comment

ID: 9010661
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between kretzschmar  and Motaz
Please leave any comments here within the next seven days.
Paul (pnh73)
EE Cleanup Volunteer

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question