Click here to Skip to main content
14,843,569 members
Home / Discussions / C#
   

C#

 
AnswerRe: can not set breakpoint Pin
Tony Richards6-Jul-08 10:40
MemberTony Richards6-Jul-08 10:40 
GeneralRe: can not set breakpoint Pin
George_George6-Jul-08 15:52
MemberGeorge_George6-Jul-08 15:52 
QuestionHow to execute oracle procedure in c# Pin
Puneri6-Jul-08 1:29
MemberPuneri6-Jul-08 1:29 
AnswerRe: How to execute oracle procedure in c# Pin
darkelv6-Jul-08 2:18
Memberdarkelv6-Jul-08 2:18 
QuestionmdiChild Form Pin
zeeShan anSari6-Jul-08 1:28
MemberzeeShan anSari6-Jul-08 1:28 
AnswerRe: mdiChild Form Pin
DaveyM696-Jul-08 1:38
professionalDaveyM696-Jul-08 1:38 
GeneralRe: mdiChild Form Pin
zeeShan anSari6-Jul-08 1:54
MemberzeeShan anSari6-Jul-08 1:54 
QuestionHow to lock record when inserting Pin
dabuskol5-Jul-08 23:33
Memberdabuskol5-Jul-08 23:33 
Hi,

I have more than 10 users inserting records at the same in one table throughout the day and most of the time I have problem mixing data. I have a header/detail entry form web page.

My insert occurs when the users click the Submit button, it will SELECT the next available number from DB and use it as my Primary key to insert record (header/detail).
Most of the time 2 users get the primary key at the same time.

If you could redirect me to the site with has the solution in locking or help me in my problem
My Solution but sometimes it failed.
bool blnExist = false;
while (!blnExist)
{
  string sKdey = PopulateDraftNumber();
  if (IfKeyExists(sKdey))
  {
    blnExist = false; //found record, reselect another key
  }
  else
   {
    blnExist = true; //found no record insert into table
    lblRequestNo.Text = sKdey;
    INSERT RECORD INTO TABLE
   }
}


Dabsukol

AnswerRe: How to lock record when inserting Pin
Nader Elshehabi6-Jul-08 0:29
MemberNader Elshehabi6-Jul-08 0:29 
GeneralRe: How to lock record when inserting Pin
dabuskol6-Jul-08 1:01
Memberdabuskol6-Jul-08 1:01 
GeneralRe: How to lock record when inserting Pin
Nader Elshehabi6-Jul-08 1:13
MemberNader Elshehabi6-Jul-08 1:13 
AnswerRe: How to lock record when inserting Pin
Pete O'Hanlon6-Jul-08 11:09
mvePete O'Hanlon6-Jul-08 11:09 
QuestionQuestion about running threads in C# Pin
Yanshof5-Jul-08 21:46
MemberYanshof5-Jul-08 21:46 
AnswerRe: Question about running threads in C# Pin
Nader Elshehabi6-Jul-08 0:50
MemberNader Elshehabi6-Jul-08 0:50 
QuestionEditing DataGridViewImageCell? Pin
anton-095-Jul-08 19:34
Memberanton-095-Jul-08 19:34 
AnswerRe: Editing DataGridViewImageCell? Pin
Nader Elshehabi6-Jul-08 0:54
MemberNader Elshehabi6-Jul-08 0:54 
QuestionVS2005 whether there are similar delphi in the control Notebook Pin
ChinaTJBoy5-Jul-08 17:54
MemberChinaTJBoy5-Jul-08 17:54 
AnswerRe: VS2005 whether there are similar delphi in the control Notebook Pin
Nader Elshehabi6-Jul-08 0:20
MemberNader Elshehabi6-Jul-08 0:20 
Questionhow to change DataGridView Event calling sequence Pin
Xmen Real 5-Jul-08 17:49
professional Xmen Real 5-Jul-08 17:49 
AnswerRe: how to change DataGridView Event calling sequence Pin
Nader Elshehabi6-Jul-08 0:18
MemberNader Elshehabi6-Jul-08 0:18 
GeneralRe: how to change DataGridView Event calling sequence Pin
Xmen Real 6-Jul-08 0:23
professional Xmen Real 6-Jul-08 0:23 
GeneralRe: how to change DataGridView Event calling sequence Pin
Nader Elshehabi6-Jul-08 1:03
MemberNader Elshehabi6-Jul-08 1:03 
GeneralRe: how to change DataGridView Event calling sequence Pin
Xmen Real 6-Jul-08 2:26
professional Xmen Real 6-Jul-08 2:26 
GeneralRe: how to change DataGridView Event calling sequence Pin
Nader Elshehabi6-Jul-08 2:52
MemberNader Elshehabi6-Jul-08 2:52 
GeneralRe: how to change DataGridView Event calling sequence Pin
Xmen Real 6-Jul-08 2:55
professional Xmen Real 6-Jul-08 2:55 

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.