powerbuilder function is not executing messagebox

Posted on 2009-02-19
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
Question by:badtz7229
    LVL 14

    Expert Comment

    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
    End If
    If IsNull(ls_source) Then ls_source = ''
    MESSAGEBOX ( 'TEST', ls_source)
    return  ls_source



    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    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 NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now