[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.inetserver.asp.db

hummingbirdhollow.ca geeo

Katadedajab

12/26/2013 9:02:00 AM

<a href=http://www.electrolysis.ca><b&... kors outlet canada</b></a>Thanks a piece of land SAM,as well as going to be the nice article about best five ways for more information on need to your enterprise commenting. This could be the an extra ordinary and easy for additional details on realizing article that i always was searching for months But i always for around one or more a great deal more thing all your family members ricky include them as added about going to be the way to find out along the lines of have to worry about observe your web business Thanks as well as for sharing my hand in this posting.<a href=http://www.hummingbirdhollow.ca><b&... kors watches</b></a>Come to explore this network shopping mall,your family can can get a lot of the things your family want to learn more about can get a majority of these things for more information about get to know many including your needs, this article has given me a lot of inspiration.<a href=http://www.hummingbirdhollow.ca><b&... kors outlet canada</b></a>They need to be a good deal more organized along with some of these events. Fingerprinting may be the normally among the most used in an absolute must have official documents a little as though ID Cards. However, fingerprint will be the an indisputable proof along the lines of identity.<a href=http://www.hummingbirdhollow.ca><b&... kors bags</b></a>I¡¯m don't really bothered about nested kind comments an way or at best going to be the some other I think they do just fine well about whether or not going to be the blogger would be the fact replying to explore every comment,but take heart for that matter then,it may can get too much of the (For instance, instead such as getting each of them is my own personal replies in this article into one comment, I¡¯d end up being allowing an individual four kind comments Plus,a few of these novice/lazy users just click going to be the preparing any other part ¡°reply for more information about this comment¡± button they schedule an appointment with and turn out to be confusing element all<a href=http://www.synray.ca><b&... kors outlet</b></a>
1 Answer

Terry Olsen

8/2/2007 9:57:00 PM

0

Heh..got it to work. Here's the SQL Statement.

UPDATE [Articles] SET [Status]='test' WHERE ID=(SELECT TOP 1 [ID] FROM
[Articles] WHERE [Status]='')


"Terry Olsen" <tolsen64@hotmail.com> wrote in message
news:%230fJuuU1HHA.600@TK2MSFTNGP05.phx.gbl...
>I have several threads (clients) that will be querying the database to get
>records. I need to update that record FIRST to show that it's in use by a
>client. That way none of the other clients will select it. If I do it the
>way you say, it's possible that another client will get in there and select
>the same record.
>
> Table layout is:
> ID as PrimaryKey
> ArticleID as Text
> Status as Text
>
> My method, if I can get it to work, or find a better method is:
>
> Client updates first record with an empty Status field with it's ClientID.
> Client then selects the record WHERE Status=it's ClientID
> Client works on the ArticleID from that record...
> Client then updates the record's Status to 'Finished'
> Repeat process.
>
>
> "Marina Levit" <someone@someplace.com> wrote in message
> news:uhEPKxT1HHA.5772@TK2MSFTNGP02.phx.gbl...
>> You are saying you want to update any record where the Status is blank,
>> you don't care which, so long as it is just one?
>>
>> That sounds like bad database design. You should have a primary key that
>> never changes, select top 1 and get the primary key of one record, then
>> use that in the WHERE for your update. You can then use the same key for
>> your SELECT later.
>>
>> "Terry Olsen" <tolsen64@hotmail.com> wrote in message
>> news:ecndPsT1HHA.4184@TK2MSFTNGP06.phx.gbl...
>>> I'm using the OLEDB provider against an Access Database. I need to
>>> update just one record. Is there any way to do something like this?
>>>
>>> UPDATE TOP 1 [Articles] SET [Status]='MyClientID' WHERE [Status]=''
>>>
>>> I only want to update one record, because i'm going to select that
>>> record in the next statement by using:
>>>
>>> SELECT * FROM [Articles] WHERE [Status]='MyClientID'
>>>
>>> Any suggestions or guidance?
>>>
>>> Thanks.
>>>
>>
>>
>
>