Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > needing for enqueuing SQL commands

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-03, 09:48
gutoim gutoim is offline
Registered User
 
Join Date: Dec 2003
Location: Romania
Posts: 4
needing for enqueuing SQL commands

My current project is a kind of recorder, i'm using Visual C++ 6.0 and ADO. To simplify the problem: there are two threads. First thread (acquisition) has a higher priority because is dealing with inserting an updating the rows in db (there are a few commands per minute). The second (interface) thread run some update, delete commands and very long time queries (select).

Question 1:
Is there any reason that each thread must have its own instance of
connection (object) to the database, or I can use the the same global
instance connection for both?

further,
one of my mate has his idea that all SQL commands must be queued, and to exist another thread (related to a connection instance) that execute the SQL commands. I agree with this only for select commands that are executed on one thread and may be canceled from another.

Question 2:
Is there any reason that insert, update, delete take long time so they must be enqueued avoiding the blocking of thread (acquisition)?

Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On