Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB, C#, and VFP data handling examples
Message
De
12/04/2007 17:22:21
 
 
À
12/04/2007 16:32:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01215120
Message ID:
01215270
Vues:
59
Yes, I'm aware of that, but I'm not using Stored Procs ... yet.

>Craig,
>
>Just one suggestion (not a criticism of what you're doing, just a suggestion)...
>
>SQL 2005 contains a new OUTPUT clause that you can include on an INSERT statement in a stored proc - it allows you to get the value of an identity column, without needing to make a round-trip back to the server just to get a PK value.
>
>Whereas previously most people did something like...
>
>
>INSERT INTO MyTable ( ColumnList) VALUES ( @ColumnList)
>SELECT @primkey = SCOPE_IDENTITY()
>SELECT * FROM MyTable WHERE primkey = @primkey
>
>
>
>You can now do this...
>
>
INSERT INTO MyTable (ColumnList) output inserted.*  VALUES (@ColumnList)
>
>
>Essentially, SQl 2005 is now allowing developers to query the inserted (and deleted) system tables as part of the OUTPUT clause. The tables were previously invisible outside of a trigger.
>
>
>Again, what you're doing works, just a suggestion for you.
>
>Kevin
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform