?
Solved

interbase and threads

Posted on 2002-06-12
8
Medium Priority
?
153 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 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 ;-)
0
 
LVL 7

Assisted Solution

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

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

771 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