Solved

datawindow object question from powerbuilder 9

Posted on 2004-10-06
4
527 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

765 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