Subject | Re: [ib-support] THREAD PROGRAMMING |
---|---|
Author | Jason Frey |
Post date | 2002-02-26T16:07:24Z |
Not really.
But, from experience, it's pretty easy (If you know the tricks).
Make sure the thread has it's own database connection (And Session if you're
using the BDE. If you don't manually create your own session, that's bad
news, according to the BDE people. Not using BDE, I can't say for sure, but
I'd be inclined to trust them). Also, I make sure it has its own access
components (Queries, etc). I've heard some people create an instance of a
datamodule inside the thread to handle all of the above concerns.
The biggest key is to make sure all threads (Including the main thread of
the program) are using the remote string, even if the DB is local
(Otherwise, your thread will crash in mysterious ways, and you'll spend days
trying to figure it out). IE, if your connect string is something like
"c:\db\thedb.gdb" make it "localhost:c:\db\thedb.gdb"...
To tell the truth, that's about it, as far as IB/FB and threading goes.
Dealing with anything else thread-wise (Accessing variables in your main
thread, etc) is up to you to handle in the proper manner.
- Jason
But, from experience, it's pretty easy (If you know the tricks).
Make sure the thread has it's own database connection (And Session if you're
using the BDE. If you don't manually create your own session, that's bad
news, according to the BDE people. Not using BDE, I can't say for sure, but
I'd be inclined to trust them). Also, I make sure it has its own access
components (Queries, etc). I've heard some people create an instance of a
datamodule inside the thread to handle all of the above concerns.
The biggest key is to make sure all threads (Including the main thread of
the program) are using the remote string, even if the DB is local
(Otherwise, your thread will crash in mysterious ways, and you'll spend days
trying to figure it out). IE, if your connect string is something like
"c:\db\thedb.gdb" make it "localhost:c:\db\thedb.gdb"...
To tell the truth, that's about it, as far as IB/FB and threading goes.
Dealing with anything else thread-wise (Accessing variables in your main
thread, etc) is up to you to handle in the proper manner.
- Jason
----- Original Message -----
From: Ben Johnson
To: ib-support@yahoogroups.com
Sent: Tuesday, February 26, 2002 7:50 AM
Subject: [ib-support] THREAD PROGRAMMING
Hi,
Is there an tutoraial available on FB/Database thread
programming.
Thank you.
Ben
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.