Hi
im still hving a problem with my Identity value that is returned after my insert query
What i have done is inserted a row into a datatable and then used an dataAdapters UPDATE command to push the values into my database
My insert query looks like the following..
ALTER PROCEDURE dbo.InsClientAndSelIdentit
@Surname char(50)
@Forename char(50)
@OrgName varchar(50)
@Address varchar(300)
@Postcode varchar(50)
@PhoneNo varchar(25)
@Identity int OU
A
SET NOCOUNT OFF
INSERT INTO Client(Surname, Forename, OrgName, Address, Postcode, PhoneNo) VALUES (@Surname, @Forename, @OrgName, @Address, @Postcode, @PhoneNo)
SET @Identity = SCOPE_IDENTITY()
Retur
I then assign the returned @Identity value to the datatable the values were pushed from
by using..
Dim myIdentity As SqlParameter = daClient.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "ClientID"
The problem is that this puts the value back into the parent table that the UPDATE method was run on. I want to add this value to another child table instead
Is there anyway i can place this returned IDENTITY value into a variable so it can be reused elsewhere??
As im running really short on time, any help would be fantastic
Deadlines :o