Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple example of a transaction
Message
De
28/03/2006 14:16:48
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 7.0
Divers
Thread ID:
01108501
Message ID:
01108525
Vues:
11
I've never done a RETURN from a SP. Is that just read back into the Data Reader in .NET? Here is the code I use, and I base my results on if there were records affected or not.
        Try
            Conn1.Open()
            DataReader = DeleteCommand.ExecuteReader(CommandBehavior.SingleRow)
        Catch
            Conn1.Close()
            DeleteCommand.Dispose()
            Return -1
        Finally
            Conn1.Close()
            DeleteCommand.Dispose()
        End Try
        If DataReader.RecordsAffected > 0 Then
            Return 1
        Else
            Return 0
        End If
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform