🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #2263

Re: ADO.NET - Bloccare la lettura di una tabella

#2263
From: Netslacker
Date: Thu, 26 Jun 2003 12:39
23 lines
2331 bytes
"Raffaele Rialdi" <malta@n0spam_vevy.com> ha scritto nel messaggio
news:eEyXRB1ODHA.1608@TK2MSFTNGP11.phx.gbl...
> Io intendevo uno statement Update (da lanciare in un command) che
verifichi
> nella clausola where che ci sia un residuo da pagare.
> Nell'esempio che segue, do per scontato che stai lavorando con sql server,
> ma la cosa � adattabile con altri db.
>
> Puoi fare per esempio un command (o anche una stored procedure) con questa
> unica query separata da ;
>
> declare @Tot as integer;
> select @Tot = SUM(Importo) from MyTable where Commessa= @Id;
> update MyTable set Importo = @Tot - @Pagamento from MyTable
>    where Commessa= @Id and (@Tot > @Pagamento)
>

Ho provato con l'Insert e funziona, anche se per le mie esigenze � un po'
complicato.
Effettivamente per� (come ho fatto io) prende un record alla volta

ciao
Technical Details
Message-ID: <rQBKa.121663$Ny5.3466679@twister2.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
References: <8W%Ia.108224$Ny5.3122798@twister2.libero.it> <#hbR2bQODHA.2172@TK2MSFTNGP10.phx.gbl> <4oAJa.111908$Ny5.3241362@twister2.libero.it> <OQBUGbdODHA.2228@tk2msftngp13.phx.gbl> <LXaKa.119763$lK4.3387350@twister1.libero.it> <eEyXRB1ODHA.1608@TK2MSFTNGP11.phx.gbl>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,fa2856aabc00a4a8
X-Google-Attributes: gidf94ee,public
X-Google-Thread: 10b997,fa2856aabc00a4a8
X-Google-Attributes: gid10b997,public
X-Google-Thread: 10c104,fa2856aabc00a4a8
X-Google-Attributes: gid10c104,public
X-Google-ArrivalTime: 2003-06-26 05:39:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
From: "Netslacker" <netslacker@iname.com>
Newsgroups: free.it.visual-basic,it.comp.lang.visual-basic,microsoft.public.it.dotnet.vstudio
References: <8W%Ia.108224$Ny5.3122798@twister2.libero.it> <#hbR2bQODHA.2172@TK2MSFTNGP10.phx.gbl> <4oAJa.111908$Ny5.3241362@twister2.libero.it> <OQBUGbdODHA.2228@tk2msftngp13.phx.gbl> <LXaKa.119763$lK4.3387350@twister1.libero.it> <eEyXRB1ODHA.1608@TK2MSFTNGP11.phx.gbl>
Subject: Re: ADO.NET - Bloccare la lettura di una tabella
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <rQBKa.121663$Ny5.3466679@twister2.libero.it>
Date: Thu, 26 Jun 2003 12:39:51 GMT
NNTP-Posting-Host: 151.37.71.87
X-Complaints-To: abuse@net24.it
X-Trace: twister2.libero.it 1056631191 151.37.71.87 (Thu, 26 Jun 2003 14:39:51 MET DST)
NNTP-Posting-Date: Thu, 26 Jun 2003 14:39:51 MET DST
Organization: [Infostrada]