Home Page › Forums › BizTalk 2004 – BizTalk 2010 › I have a problem to get @@Identity Value
- This topic has 0 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
December 17, 2006 at 4:47 AM #16964
Hi to all Gurus,
I am using updategram in that I am having problem to get the IDENTITY in the case of multiple insert.
I have constructed this project based on the following link
http://msdn2.microsoft.com/en-us/library/ms935658.aspx
this link helps for a single parent and many child (i.e) one to many.
but while giving more more parent records and as well as more related
child records it having following problem can any one help me
I explain my problem with an example as below:
I have two tables in sql, one is master another one is detail. these are
related to one another. let us assume, one is studentname table another one
is studnetmark detail. I have added the data into these table with
sqladapter.First i have inserted into studentname in one table and take the
IDENTITY, after that insert into student Mark table with StudentName
Identity. I have inserted the StudentName s and respective Marks in
StudentMark details. But i can't get the Correct IDENTITY. But Last IDENTITY
has been repeated for all the StudentMark's rows which ever i inserted.This is My Inbound Message:
<ns0:Student xmlns:ns0="http://InsertMarklist.Input">
<Details Name="jana" City="VLR">
<Mark EName="EName_0" M1="50" M2="50" M3="50" />
<Mark EName="EName_1" M1="50" M2="50" M3="50" />
</Details>
<Details Name="sample" City="City_1">
<Mark EName="EName_4" M1="50" M2="50" M3="50" />
<Mark EName="EName_5" M1="50" M2="50" M3="50" />
</Details>
</ns0:Student>I GOT THE RECORDS IN BELOW FORMAT
STUDENTNAME Table
————————-ID NAME CITY
——————————-
22 jana VLR
23 sample City_1STUDENTMARK Table (Here i m having problem in ID)
————————-ID EXAM M1 M2 M3 TOT
———————————————————————-
23 EName_0 50 50 50 150
23 EName_1 50 50 50 150
23 EName_4 50 50 50 150
23 EName_5 50 50 50 150NOTE: SEE the ID column is in same value.
I expected in SQL
STUDENTNAME Table
————————-ID NAME CITY
——————————-
22 jana VLR
23 sample City_1STUDENTMARK Table
————————-ID EXAM M1 M2 M3 TOT
———————————————————————-
22 EName_0 50 50 50 150
22 EName_1 50 50 50 150
23 EName_4 50 50 50 150
23 EName_5 50 50 50 150Thans In Advance
Jana
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.