Click here to Skip to main content
16,003,417 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to insert data Pin
Frank Kerrigan8-Aug-05 2:19
Frank Kerrigan8-Aug-05 2:19 
GeneralRe: how to insert data Pin
Colin Angus Mackay9-Aug-05 2:35
Colin Angus Mackay9-Aug-05 2:35 
Generalplease help... Pin
mhmo5-Aug-05 6:46
mhmo5-Aug-05 6:46 
GeneralRe: please help... Pin
Rob Graham5-Aug-05 7:55
Rob Graham5-Aug-05 7:55 
GeneralRe: please help... Pin
mhmo5-Aug-05 8:03
mhmo5-Aug-05 8:03 
GeneralRe: please help... Pin
Rob Graham5-Aug-05 8:09
Rob Graham5-Aug-05 8:09 
GeneralRe: please help... Pin
mhmo5-Aug-05 9:53
mhmo5-Aug-05 9:53 
GeneralRe: please help... Pin
Albert Pascual5-Aug-05 10:25
sitebuilderAlbert Pascual5-Aug-05 10:25 
GeneralRe: please help... Pin
mhmo5-Aug-05 10:38
mhmo5-Aug-05 10:38 
GeneralRe: please help... [edit] Pin
toxcct6-Aug-05 23:25
toxcct6-Aug-05 23:25 
QuestionHow to backup all databases Pin
Albert Pascual5-Aug-05 6:34
sitebuilderAlbert Pascual5-Aug-05 6:34 
AnswerRe: How to backup all databases Pin
Rob Graham5-Aug-05 8:23
Rob Graham5-Aug-05 8:23 
GeneralRe: How to backup all databases Pin
Albert Pascual5-Aug-05 10:23
sitebuilderAlbert Pascual5-Aug-05 10:23 
GeneralRe: How to backup all databases Pin
Dario Solera8-Aug-05 3:49
Dario Solera8-Aug-05 3:49 
GeneralRe: How to backup all databases Pin
Albert Pascual8-Aug-05 5:06
sitebuilderAlbert Pascual8-Aug-05 5:06 
GeneralRecover the Sql data..... Pin
imshally815-Aug-05 2:37
imshally815-Aug-05 2:37 
GeneralRe: Recover the Sql data..... Pin
Rob Graham5-Aug-05 3:00
Rob Graham5-Aug-05 3:00 
GeneralRe: Recover the Sql data..... Pin
imshally815-Aug-05 3:11
imshally815-Aug-05 3:11 
GeneralProblem when installing Microsoft SQL Server Desktop Engine Pin
MarcLaheij4-Aug-05 23:15
MarcLaheij4-Aug-05 23:15 
GeneralI want to use store procedure with table argument Pin
manish k patel4-Aug-05 19:37
manish k patel4-Aug-05 19:37 
GeneralRe: I want to use store procedure with table argument Pin
4-Aug-05 20:51
suss4-Aug-05 20:51 
GeneralNHibernate and DataGrid paging Pin
devvvy4-Aug-05 16:35
devvvy4-Aug-05 16:35 
GeneralHELP:identifying table name in a database Pin
girl_lash4-Aug-05 14:13
girl_lash4-Aug-05 14:13 
GeneralRe: HELP:identifying table name in a database Pin
Rob Graham4-Aug-05 16:39
Rob Graham4-Aug-05 16:39 
GeneralRecord-locking... Pin
Laffis4-Aug-05 4:39
Laffis4-Aug-05 4:39 
Hi
I am a newbee in db programming and I am now using MFC ODBC classes. (I do not use DAO as MSDN says we should not develop new project with it... is this true? D'Oh! | :doh: )

I see that default locking mechanism, which is optimistic locking, only occurs on Update(). This, however, means that in a multithreaded application, if thread-1 is going to do an AddNew, thread-2 is going to do an Edit, a switching context means that the 2 thread may race against each other hence causes conflict.

Currently what I do is creating a global mutex object for each table. Each db opration, e.g. an edit operation (including Open(), Edit(), Update()) must be guarded by this mutex object.

This gaurantees to fight off race condition. But does anyone know a better solution? Confused | :confused:

thx!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.