tesmc
asked on
powerbuilder function is not executing messagebox
I have a function that gets called within a dw that returns a string from a query as follows:
String ls_source
select 'test' into :ls_source from dual;
MESSAGEBOX ( 'TEST', ls_source)
return ls_source
However, the MESSAGEBOX never executes if placed after the sql. i don't know why.
please assist
String ls_source
select 'test' into :ls_source from dual;
MESSAGEBOX ( 'TEST', ls_source)
return ls_source
However, the MESSAGEBOX never executes if placed after the sql. i don't know why.
please assist
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
after calling select statement, ls_source becomes null becoz of something wrong with your database connection.
If the value of title or text is null, the MessageBox does not display.
Which database are you connected to?
Try this...
String ls_source
select 'test' into :ls_source from dual;
If sqlca.sqlcode <> 0 Then
Messagebox('SQLERR',sqlca.
End If
If IsNull(ls_source) Then ls_source = ''
MESSAGEBOX ( 'TEST', ls_source)
return ls_source
Regards,
Sandeep