?
Solved

datawindow object question from powerbuilder 9

Posted on 2004-10-06
4
Medium Priority
?
556 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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ā€¦
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.
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.
Suggested Courses

777 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