Re: Database Locking?!?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 26114
interpreted = N
texte = Dear Howard - You don't _have_ to do the big search. Create a LastNumber.db with a singlecolumn and store your sequential number there. Initially, populate it withhighest number in use. Now, do an UPDATE with a nested lookup on theLastNumber.db and increase the sequence number, using that new sequence numberto APPEND to the main database. You are always doing a search on a singlerecord database, and the atomic nature of lookup feeding the update will meanthat you cannot get a duplicate sequence number.HTHJohn Peacock____________________Reply Separator____________________Subject: Database Locking?!? Author:
(WebCatalog Talk)Date: 1/12/00 4:32 PMThis has been discussed before and I'm bringing it up again...Database locking.Let me make a few quick assumptions for my problem to prevent solutionsthat I can't use:1. I MUST use my sequential number solution as the record ID.2. Refer to #13. I can't really reduce the size of the database for other reasons.Based on the above assumptions, I do a search on a database in order todetermine the next sequential number, and then I append the record withthat new ID number, and all it's information (a lot of information).Unfortunately, it seems that this append takes so long (much less than asecond, but long enough to cause this problem), if another person hits thepage, they TOO will get that same ID since the new one wasn't appended tothe database before they hit that page. It's gotten to a point where Iactually can get 6 duplicate IDs, and that's just plain bad.My question is, I need to do database locking somehow. If I do mysearch INSIDE of the append, will that lock access to the database untilthe append completes, and therefore solve my duplicate ID problem?If not, any other ideas on this (but sticking to the top 3 assumptions)?Thanks. Appreciate any help on this one that I can get.-Howard-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
|
- Re: Database Locking?!? ( 2000)
|
Dear Howard - You don't _have_ to do the big search. Create a LastNumber.db with a singlecolumn and store your sequential number there. Initially, populate it withhighest number in use. Now, do an UPDATE with a nested lookup on theLastNumber.db and increase the sequence number, using that new sequence numberto APPEND to the main database. You are always doing a search on a singlerecord database, and the atomic nature of lookup feeding the update will meanthat you cannot get a duplicate sequence number.HTHJohn Peacock____________________Reply Separator____________________Subject: Database Locking?!? Author: (WebCatalog Talk)Date: 1/12/00 4:32 PMThis has been discussed before and I'm bringing it up again...Database locking.Let me make a few quick assumptions for my problem to prevent solutionsthat I can't use:1. I MUST use my sequential number solution as the record ID.2. Refer to #13. I can't really reduce the size of the database for other reasons.Based on the above assumptions, I do a search on a database in order todetermine the next sequential number, and then I append the record withthat new ID number, and all it's information (a lot of information).Unfortunately, it seems that this append takes so long (much less than asecond, but long enough to cause this problem), if another person hits thepage, they TOO will get that same ID since the new one wasn't appended tothe database before they hit that page. It's gotten to a point where Iactually can get 6 duplicate IDs, and that's just plain bad.My question is, I need to do database locking somehow. If I do mysearch INSIDE of the append, will that lock access to the database untilthe append completes, and therefore solve my duplicate ID problem?If not, any other ideas on this (but sticking to the top 3 assumptions)?Thanks. Appreciate any help on this one that I can get.-Howard-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
b12 cannot limit records returned and more. (1997)
How can I record purchases to a database? (1998)
PSC recommends what date format yr 2000??? (1997)
Web Logs (1998)
Document Contains No Data! (1997)
Google does it... can WebDNA? Showing only the section with (2003)
Include a big block of text (1997)
Need Photo Placement Suggestions (2002)
ShowCart Errors (2000)
Variables for chat (1997)
[WebDNA] Secure cookies (HttpOnly/Secure) (2013)
Database of Tax Rates? (1997)
Where's Cart Created ? (1997)
Cart date/time (2006)
Serial Number Question (1997)
[OrderFile] error (help) (1999)
Database cannot be opened (2005)
Re:2nd WebCatalog2 Feature Request (1996)
Sorting by date (1997)
emailer on Windows Beta 18 (1997)