[seasar-user-en:38] Re: How to get ID after insert ?

Kazuya Sugimoto [E-MAIL ADDRESS DELETED]
Fri Jun 29 06:15:24 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


-- 
Kazuya Sugimoto
Microsoft MVP Visual Developer - Solutions Architect
http://d.hatena.ne.jp/sugimotokazuya/



More information about the seasar-user-en mailing list