Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Insert Items in ddlb of dw column

Posted on 2004-04-13
4
Medium Priority
?
627 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 150 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

618 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