Solved

Insert Items in ddlb of dw column

Posted on 2004-04-13
4
621 Views
Last Modified: 2013-12-26
Hi,

I have one column in my dw object with style as ddlb. I have not inserted any items in design time. I want to insert these items dynamically.
Please let me know the property to insert the items with display value and data value in that.

Thanks
Srinib
0
Comment
Question by:srinib
[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
  • 2
4 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10819072
See SetValue, GetValue Functions

Example:
dw_employee.SetValue("emp_state", 3, "Texas")
string Status

Status = dw_employee.GetValue(7,3)

Regards
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10819074
See SetValue, GetValue Functions

Example:
dw_employee.SetValue("emp_state", 3, "Texas")
string Status

Status = dw_employee.GetValue(7,3)

Regards
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 10820092
hi srinib,

u can set the values as follows....

dw_1.Object.status.Values = "Active~tA/Part Time~tP/Terminated~tT"


where,
Active,Part time and Terminated are the display values and...
A, P, T are the datavalues....and
status is the column on the dw which is ddlb....

u can use ur normal dot object notation in itemchanged or any event to get the value of column 'status'...


Cheers,
Rosh
0
 
LVL 8

Accepted Solution

by:
gajender_99 earned 50 total points
ID: 10821690
The following statements use a SQL cursor and FETCH statement to populate the ListBox portion of a DropDownListBox style column called product_col of a DataWindow object with code table values:

integer prod_code, i = 1

string prod_name

DECLARE prodcur CURSOR FOR
            SELECT product.name, product.code
            FROM product USING SQLCA;

CONNECT USING SQLCA;

IF SQLCA.SQLCode <> 0 THEN
            MessageBox("Status","Connect Failed " &
                  + SQLCA.SQLErrText)
            RETURN

END IF

OPEN prodcur;

IF SQLCA.SQLCode <> 0 THEN
            MessageBox("Status","Cursor Open Failed " &
                  + SQLCA.SQLErrText)
            RETURN

END IF

FETCH prodcur INTO :prod_name, :prod_code;

DO WHILE SQLCA.SQLCode = 0
            dw_products.SetValue("product_col", i, &
                  prod_name + "~t" + String(prod_code))
            i = i + 1
            FETCH prodcur INTO :prod_name, :prod_code;

LOOP

CLOSE prodcur;

DISCONNECT USING SQLCA;

0

Featured Post

Technology Partners: 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

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…
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 column That will then direct you to their download page. From that p…
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 perform CRUD operations on a MySql database.

688 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