Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert new row in dddw

Status
Not open for further replies.

Sjoker

Programmer
Aug 4, 2000
30
NL
Hi,

In a column with a dropdowndw I select values from a ref table. How can I insert a new record in the ref table by inserting a new record in the dropdowndw column?

 
You can create a SQL statement and then 'EXECUTE IMMEDIATE'
or you can use imbedded sql to insert the value as part of a normal dw save routine.
 
DDDWs are generally lookup/reference tables undermining them. Usually, there will be data-entry screens to update/insert/delete the lookup/reference data. If you have one, you may update the lookup screen directly.

If you are sharing the DDDWs data from another source, you may insert a row in the Primary dw/ds that would show up in the DDDW.

If you are interested in inserting a row just on the fly in the DDDW without having to update the dB, do a GetChild() and then insert a row in the child-dw. Whether this would save data referenced on the main dw depends on the table constraints. If the DataObject attached to the DDDW is updateable, you can update the underlying table using the child-dw.Update().

As a last resort, you may do a raw INSERT into the table and refresh the DDDW.

---
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top