Here is my stored proc
[dbo].[pInsertActivity]
(
@ActivityID int,
@Location int,
@LocationID int,
@Notes varchar(5000)
)
AS
SET NOCOUNT OFF;
INSERT INTO [Activity].[tblActivities]
(
[ActivityID],
[Location],
[LocationID],
[Notes]
)
VALUES
(
@ActivityID,
@Location,
@LocationID,
@Notes
)
select @@identity as fldIdentity
here is my vb code
Public Sub Save()
TableAdapterCreate().Update(dataTable:=Me)
End Sub
Private Function TableAdapterCreate() As ActivityTableAdapter
Dim TA As New ActivityTableAdapter
TA.Connection.ConnectionString = My.Settings.ConnectionString
Return TA
End Function
I want to get the @@Identity value for use elsewhere in my post....not sure how to do that. I noticed that the Me datatable has columns and one of the colums is me.fldIdentity. How can I get the value of that so I can use it later in my project.
thanks for your help
joe
[dbo].[pInsertActivity]
(
@ActivityID int,
@Location int,
@LocationID int,
@Notes varchar(5000)
)
AS
SET NOCOUNT OFF;
INSERT INTO [Activity].[tblActivities]
(
[ActivityID],
[Location],
[LocationID],
[Notes]
)
VALUES
(
@ActivityID,
@Location,
@LocationID,
@Notes
)
select @@identity as fldIdentity
here is my vb code
Public Sub Save()
TableAdapterCreate().Update(dataTable:=Me)
End Sub
Private Function TableAdapterCreate() As ActivityTableAdapter
Dim TA As New ActivityTableAdapter
TA.Connection.ConnectionString = My.Settings.ConnectionString
Return TA
End Function
I want to get the @@Identity value for use elsewhere in my post....not sure how to do that. I noticed that the Me datatable has columns and one of the colums is me.fldIdentity. How can I get the value of that so I can use it later in my project.
thanks for your help
joe