Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8293691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:54:57+00:00 2026-06-08T13:54:57+00:00

I am using SetTransObject() and Retrieve() on PowerBuilder 12.5 Classic. However it doesn’t give

  • 0

I am using SetTransObject() and Retrieve() on PowerBuilder 12.5 Classic. However it doesn’t give the user much power in retrieving data;
I have a single line edit(sle_employeeID), which the user needs to insert in the employee ID and the DataWindow displays the employee data (IDNO, name, age, designation) of a selected ID NO.

dw_1.settransobject(sqlca)
string employeeID
employeeID=sle_employee.text
dw_1.retrieve(employeeID)

The code retrieves the whole data as per my specifications from the DataWindow object, I used a tabular and quick select statement.
Please help with a code that will give me a freer way to select data via controls.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:54:59+00:00Added an answer on June 8, 2026 at 1:54 pm

    You may want to use the DataWindow’s Query Mode as Terry mentioned. You will have to provide your user with instructions, but the basic use is to simply enter the values you want to match directly in the DataWindow. For more information see the topic Providing query ability to users in the DataWindow Programmer’s Guide. Here is code I have in one of my utility windows. It uses a menu with a toolbar button to put the DataWindow in Query Mode and to turn Query Mode off and retrieve. I’m using PFC message routing between the menu and the DataWindow event but you could simply call the event from a button clicked event, in which case you’d remove the lines that modify the menu.

    // this code is in an event in the DataWindow
    // toggles query mode on and off
    
    if "no" = object.dataWindow.queryMode then
        // you may want to check for unsaved changes here and let the user go back
        object.dataWindow.queryMode = "yes"
        m_myMenu.m_rows.m_query.checked = TRUE  // this has a button on the toolbar
    
    else
        m_myMenu.m_rows.m_query.checked = FALSE
        acceptText()
        object.dataWindow.queryMode = "no"
        retrieve()
    
    end if
    

    To get maximum flexibility set criteria.override_edit=’yes’ on some or all of the columns. The code below sets criteria.override_edit=’yes’ on all the columns. This may not be appropriate for your situation. Without override_edit the user is restricted to entering query values that pass the column validation.

    // this code is in an event in the DataWindow
    // it is called after the DataObject is set
    // it sets criteria.override_edit='yes' for all the columns
    
    string ls_describe, ls_modify, ls_col, ls_result
    integer li_colCount, li_col
    
    setTransObject(SQLCA)
    ls_describe = "datawindow.column.count"
    ls_result = dw_1.describe(ls_describe)
    if not isnumber(ls_result) then
            // logging code elided
            ls_result = '0'
    end if
    li_colCount = integer(ls_result)
    for li_col = li_colCount to 1 step -1
        ls_col = "#" + string(li_col)
        ls_modify = ls_col + ".criteria.override_edit='yes'"
        ls_result = dw_1.modify(ls_modify)
        if "" <> ls_result then 
       // every column may not have an edit, and some edits might not          // have the property. it's just as fast to try to modify it as it
       // is to check it
           // logging code elided
        end if
    next 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Core Data, I have a fetch request to fetch the minimum of a
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using Android TelephonyManager an application can obtain the state of data activity over the
Using MVC2 I have an AJAX form which is posting to a bound model.
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
Using EF Code First I have an model object that has multiple properties that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.