basic multiple threaded question...


2007-12-14 02:11:32 AM
cppbuilder36
I am using TQuery to query microsoft SQL 2000 database from builder C+
+ 6.0. I need to query from multiple threads. I had been reusing the
same query object and putting a mutex around it. But some queries are
taking too long for this approach.
So how would I allocate TQuery, TSession for each thread to use.
Something like
test_query=new TQuery;
test_session=new TSession;
...
delete test_query;
delete test_session;
But the new statements are wrong. What am I doing wrong. Thanks.
This is different from the examples because it is not form based.
Thanks,
David