I have attached an image of 开发者_如何学JAVAmy function so far. I highlighted the portion that obviously isn't going to work. I am trying to find out the powerbuilder code that will provide the same functionality as that select statement.
This question is a followup from this
This would approximate the first conditional statement
int ll_count
if typeInd = "T" then
select count(object_ident_no)
into :ll_count
from rendtn
where object_ident_no = :objectidin
using SQLCA;
end if
return (ll_count > 0)
I'm assuming that SQLCA
is your connection in my query.
One thing that stands out is your datatype of integer
for the objectidin. In PowerBuilder Integer
datatypes only hold the range of -32768 to +32767 (16 bit signed integers). So typically for representing an ID field in the database, you would want to use Long
(32 bit signed integer) that goes from -2147483648 to +2147483647. This is more like what you see for an int
in a language like Java. It is easy to exhaust 32,000 id's pretty quickly in a database.
精彩评论