Re: VB.NET and SQL

From: Tom Leylan (gee_at_iamtiredofspam.com)
Date: 03/09/04


Date: Tue, 9 Mar 2004 11:42:27 -0500

Cor: Not a problem... if you read the SQL presented once again and imagine
what it might be used for I think you can see that it isn't a concurrency
issue at all.

Imagine three users needing to obtain the "next customer" from a pool of all
customers meeting some criteria. Like the customers are late with their
payment and you have to phone them (or anything like that.) You can't have
all three users have the exact same customer record appear on the screen or
all three will make the same phone call.

It isn't an "update" problem and the requests need to be queued.

But perhaps I've interpreted it wrong...

"Cor" <non@non.com> wrote in message
news:epvhsPfBEHA.2380@TK2MSFTNGP10.phx.gbl...
> Hi Tom,
>
> I can give an answer, but I hope Bill Vaughn will do that also (This is
> also in the newsgroup adonet), I wait always on him for concurrency, he
> tells that alway so nice.
>
> But this was such a simple link with so much information.
>
> The theory about optimistic concurrency is something I tell my whole
> computing live.
> (Same idea as Bill Vaughn)
>
> :-)
>
> Cor
>
> > If I read your question correctly I don't think Cor's pointer to
> optimistic
> > concurrency will yield the answer. The only solution that I can see
> working
> > is to funnel all requests through a single source. That means a
> > server-based component (of some sort) that can queue the requests...
that
> > way when a request is being processed other requests are simply held.
> >
> > That has to be combined with a query that can determine which row(s)
have
> > already been returned. How best to implement that depends upon a few
> things
> > including how dynamic your list of rows is. The simplest way of course
is
> > to add a column and have the "request process" mark the record as having
> > been returned already. The query would include a clause to only choose
> the
> > ones without that field set.
> >
> > Try looking up "request queue" or something close to that in Google.
> >
> > Tom
> >
> > "Pepehammer" <pepehammer@hotmail.com> wrote...
> >
> > > Dim sSQLFirstAvailable As String = _
> > > "SELECT TOP 1 * " & _
> > > "FROM Mi_Table "& _
> > > "WHERE Status IN (0,3) AND WTN > '" & sLastWTN & "' " & _
> > > "ORDER BY WTN"
> > >
> > > This query it's used in a multi user program, BUT in the same moment 2
> or
> > > more users can pick the same record up.
> > > How can i do to "lock" the record that a user is using, and make the
> next
> > > user to pick up the next record?
> >
> >
>
>



Relevant Pages

  • Re: VB.NET and SQL
    ... what it might be used for I think you can see that it isn't a concurrency ... Imagine three users needing to obtain the "next customer" from a pool of all ... It isn't an "update" problem and the requests need to be queued. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VB.NET and SQL
    ... what it might be used for I think you can see that it isn't a concurrency ... Imagine three users needing to obtain the "next customer" from a pool of all ... It isn't an "update" problem and the requests need to be queued. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VB.NET and SQL
    ... what it might be used for I think you can see that it isn't a concurrency ... Imagine three users needing to obtain the "next customer" from a pool of all ... It isn't an "update" problem and the requests need to be queued. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VB.NET and SQL
    ... what it might be used for I think you can see that it isn't a concurrency ... Imagine three users needing to obtain the "next customer" from a pool of all ... It isn't an "update" problem and the requests need to be queued. ...
    (microsoft.public.dotnet.languages.vb)

Loading