Link to home
Start Free TrialLog in
Avatar of ustad
ustad

asked on

interbase and threads

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
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ustad
ustad

ASKER

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.

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 ;-)
Avatar of ustad

ASKER

No i want to casch the entire database which comes to around 100000 records.
oops,

somewhere i thought that i read something
about a last record

well, every copy/filling needs time

meikl ;-)
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