[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

datawindow object question from powerbuilder 9

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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.
Suggested Courses

650 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