Solved

interbase and threads

Posted on 2002-06-12
8
152 Views
Last Modified: 2012-05-04
hi

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.

ustad
0
Comment
Question by:ustad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 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 ;-)
0
 
LVL 7

Assisted Solution

by:Motaz
Motaz earned 50 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.

Motaz
0
 

Author Comment

by:ustad
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.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:kretzschmar
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 ;-)
0
 

Author Comment

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

Expert Comment

by:kretzschmar
ID: 7083292
oops,

somewhere i thought that i read something
about a last record

well, every copy/filling needs time

meikl ;-)
0
 
LVL 1

Expert Comment

by:pnh73
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.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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