[seasar-user-en:37] Re: How to get ID after insert ?
Kazuya Sugimoto
[E-MAIL ADDRESS DELETED]
Fri Jun 29 06:02:31 JST 2007
Hi
The return value becomes an additional number.
ID is acquired as follows. After insert.
AddEmp(employee)
Dim id As Integer = employee.EmployeeID
However, it is necessary to execute it in the transaction.
2007/6/28, tran nguyet <[E-MAIL ADDRESS DELETED]>:
> Hi All,
>
> I'm using s2sao.net 1.0.4 , and this is my problem.
>
> After inserting an object into table, I want to get back the ID which is
> automatically generated by using sequence. Then I try to use s2dao method
> like this "Function AddEmp(employee As Employee) As Integer", but the return
> Integer is always 1, not the real ID.
> Could you help me to solve this problem.
>
> Thanks in advance.
>
> MinhNguyet
>
>
>
> ________________________________
> Boardwalk for $500? In 2007? Ha!
> Play Monopoly Here and Now (it's updated for today's economy) at Yahoo!
> Games.
>
>
> _______________________________________________
> seasar-user-en mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user-en
>
>
--
Kazuya Sugimoto
Microsoft MVP Visual Developer - Solutions Architect
http://d.hatena.ne.jp/sugimotokazuya/
More information about the seasar-user-en
mailing list