Link to home
Start Free TrialLog in
Avatar of soorraj
soorrajFlag for United States of America

asked on

Retrieve values

I am new to powerbuilder. i am having problems passing and Retrieving values.
How do i pass the values to the datawindow where my SQL resides.
IF there is more than one row(result) i want to do something else.

I created a DataWindow. The datawindow has a sql statement.
Example
SELECT test1, test2, test3 from product
   WHERE (test1 = :test1 ) AND  
         ( test2 = :test2 ) AND  
         ( test3 = :test3 )  
ORDER BY test3 DESC  


Now in my code
i am assigning the dataobject
DW.DataObject = 'DW_update' this is my datawindow name

Here i  am assigning the values for the sql statement the SQL gets three arguments
Test3="12/10/2008"
Test1=1
Test2= "cyto"

My question is how do i pass the values to the datawindow and if there are more than zero rows i want to do something else.

ASKER CERTIFIED SOLUTION
Avatar of kotukunui
kotukunui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kotukunui
kotukunui

I'm assuming you have already assigned a transaction object to the datawindow control to connect it to the database e.g.

DW.SetTransObject(sqlca)

Open in new window

Avatar of soorraj

ASKER

Thanks it worked