Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

powerbuilder function is not executing messagebox

Posted on 2009-02-19
2
Medium Priority
?
512 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:badtz7229
2 Comments
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 23697118
Hi,
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.sqlerrtext)
End If
If IsNull(ls_source) Then ls_source = ''
MESSAGEBOX ( 'TEST', ls_source)
return  ls_source

Regards,
Sandeep

0
 

Accepted Solution

by:
badtz7229 earned 0 total points
ID: 23697754
sandeep_patel:
i realized that the problem was not with db connection - it was actually that when i choose run preview on a dw the function doesn't execute. but if i run the actual app. the function does execute as expected.

it's some weird powebuilder kink.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question