27.06.2014 Views

INFORMATICA MEDICA

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Stored Procedure che non<br />

restituiscono record (1)<br />

• Le stored procedure possono anche eseguire delle azioni di<br />

modifica, cancellazione o aggiunta di record, quindi senza<br />

restituire nessun insieme di record.<br />

• In questo caso per eseguirle si utilizzano direttamente gli<br />

oggetti Command e il metodo ExecuteNonQuery.<br />

• Poniamo di avere la seguente stored procedure:<br />

Procedure NumeroOrdini(@IDCliente int, @NOrdini<br />

int OUTPUT)<br />

As<br />

SELECT @NOrdini = COUNT(IDOrdine)<br />

FROM Ordini<br />

WHERE IDCliente = @IDCliente

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!