Re: How to get value of serial column from PB5.0?
Posted in 1997
the only solution I have had with this problem is to use straight SQL. e.g.
select number from table. I have had this problem too many times with noother success.
Grace Wu <grace_wu@bio-rad.com> wrote in article
<01bc5f1c$34e49590$d4a2d3c6@gwu>...
> This question is related to PowerBuilder, but I didn't really get any
> answer from PB's newsgroup, so I am posting it here with the hope that
> Informix/PB developers can give me a hand.
>
> My environment: Informix 7.21 OnLine, PB 5.0, NT 4.0, Intersolv ODBC
2.13,
> HP-UX 10.10
>
> I have serial column on some tables, and my problem is I couldn't get the
> serial value from PB after each inserted row. PB 5.0 has a 'identity
> column' feature, which supposedly should bring back the new serial value
> from Informix to PB. However, I don't know how to get the value. I had
> tried to use GetItemNumber after the Insert to get the value, but got
null
> value. I also had tried to get the SQLCA.SQLReturnData value after the
> insert, but it contained the text 'informix' instead of any numeric
value.
> Has anyone done this without any problem? What were your environment? I
am
> not sure is this a bug in PB or I just don't know how to get the value.
If
> I couldn't get this resolved, I have to modify my DB schema which I
really
> try to avoid. Any information is highly appreciated. Thanks in advance.
> Please also reply to my email address if you reply to the newsgroup.
> Thanks!
>
> Grace Wu
>
--
Mel Haynes Jr
Software Developer
Phoenix Retail Systems
1785A South 8th St
Colorado Springs, Co 80906
meljr@apisys.com
www.apisys.com