You can also use a SELECT in the SP which pulls the @IDENTITY value, and
simply call any data method which executes a Stored Procedure and returns a
record set.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
"Kevin" <ke*****@tesco.net> wrote in message
news:Op*************@TK2MSFTNGP10.phx.gbl...
Thanks for the help.
Have discovered and used:-
myID = e.Command.Parameters(0).Value.ToString
In the SqlDataSource1_Inserted event.
Kevin
"Stuart Irving" <sp**@stuartirving.net> wrote in message
news:uE****************@TK2MSFTNGP10.phx.gbl... http://www.devx.com/vb2themax/Tip/18893
"Kevin" <ke*****@tesco.net> wrote in message
news:OG**************@TK2MSFTNGP14.phx.gbl... Am very new at ASP.NET 2.0 and .NET!
Want to get the MembershipID from an inserted record using
SqlDataSource:-
<InsertParameters>
<asp:Parameter Name="MembershipID" Direction="Output" Type="Int32"
DefaultValue="0" />
<asp:Parameter Name="FirstNames" Type="String" />
<asp:Parameter Name="LastNames" Type="String" />
</InsertParameters>
How can i get the MembershipID using VB??
Thanks
Kevin