Select IDENTITY of the record after you insert, the XSD way.
Within the XSD file, create a new query -> create new standard procedure -> Select insert -> add a select query after the insert query, something like:
INSERT INTO [coupon] ([memberId], [categoryId], [couponCode], [couponName], [couponImage], [couponVideo], [couponSMSText], [couponExpiration], [couponDisclaimer], [couponPrice], [couponDiscount], [couponStart], [couponEnd], [couponLimit], [couponCreationDateTime], [couponStatus]) VALUES (@memberId, @categoryId, @couponCode, @couponName, @couponImage, @couponVideo, @couponSMSText, @couponExpiration, @couponDisclaimer, @couponPrice, @couponDiscount, @couponStart, @couponEnd, @couponLimit, @couponCreationDateTime, @couponStatus);SELECT couponId FROM coupon WHERE (couponId = SCOPE_IDENTITY())
After that, select the property of the query and select SCALAR mode instead of NonQuery
Thursday, August 20, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment