Solved

datawindow object question from powerbuilder 9

Posted on 2004-10-06
4
545 Views
Last Modified: 2013-12-26
i created a datawindow object called 'd_custlist'
i created a window called 'showme'
i created a datawindow control on the window and attached to it the datawindow object.

when i login to the database the form shows up but none of the data showed.
it just shows me the headers i created when i paint the object.

help please...anyone knows what i have to do to see the results on the datawindow control on the form?
0
Comment
Question by:stefanosn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 12236526
did you call
dw_1.settranobject(sqlca)
dw_1.retrieve()
0
 
LVL 33

Accepted Solution

by:
sajuks earned 125 total points
ID: 12236537
From the PB Help File

SQLCA.DBMS = ProfileString("myapp.ini", &
        "Database", "DBMS", " ")

SQLCA.DbParm = ProfileString("myapp.ini", &
        "Database", "DbParm", " ")

// Connect to database

CONNECT USING SQLCA;

// Test whether the connect succeeded

IF SQLCA.SQLCode <> 0 THEN
        MessageBox("Connect Failed", &
            "Cannot connect to database." &
            + SQLCA.SQLErrText)

        RETURN

END IF

Open(w_main)

To continue the example, the open event for w_main sets the transaction object for the DataWindow control dw_main to SQLCA and retrieves rows from the database. If no rows were retrieved or if there is an error (that is, the return value is negative), the script displays a message to the user:

long ll_rows

dw_main.SetTransObject(SQLCA)

ll_rows = dw_main.Retrieve()

IF ll_rows < 1 THEN MessageBox( &

        "Database Error", &

        "No rows retrieved.")
0
 

Author Comment

by:stefanosn
ID: 12236633
ok it worked!:)
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12245302
Thanks for the points and grade
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

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 perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

689 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