Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


datawindow row update properties

Posted on 2004-10-06
Medium Priority
Last Modified: 2013-12-26


1. I am using PB 9.0.1. I have designed one datawindow using SQL Select datasource and attached the table directly to the datawindow. I am calling this datawindow in a window where i am saving data(all records) of datawindow to another table. i.e. source and destination is different for the datawindow.

In the Rows --> Update Properties option in the datawindow painter i have set the procedure in tables to update dropdown as a keyword 'Stored_proc' and i have specified the columns that are to be sent as parameters to the procedure. I have also set the primary key column for updation. I am calling the actual procedure in the code. The problem is it is not saving data to the table specified in the store procedure. It is not giving any error so i am not getting whether it is calling the procedure or not. Is there any other way for this. Also how can i design a datawindow without making a database connection through database profile? i.e. i don't want to establish the database connection design time. I am establishing it runtime but still i want ot desing datwindow.
How to use native database connectivity method in PB?

Please suggest what is wrong here. What extra settings i have to do here. Is the way i am following ok? Pls. help ASAP as i am new to PB.

2. Also can anybody pls. tell me the method or steps to perform search or update(insert/delete) operations on a datawindow runtime whose datasource is external.
How to make the field in a datawindow having external datasource enabled? I have set the tab order for the fields but still it is not getting enabled like it doesn't get focused when i tab to it. Also sometimes even it did not display the field also.
Initially i want all the datawindow fields blank. I will input values runtime and then i want to update those values to the table. How can i achieve this if i took the datasource as SQL Select or External for the datawindow?

Please relpy ASAP.


Question by:mayuri25

Accepted Solution

michaelstoffel earned 300 total points
ID: 12289524
Hmm, lots of different questions here...

For stored procedure based updates, use the Rows --> Stored Procedure Update... to specify the update properties and then just use dw.Update in code.  There is no need to manually call the procedure.  What's not giving an error?  If it's the stored procedure call in code that is erroring, are you checking SQLCA.SQLCode, and other properties?

A database connection is required when using the datawindow painter.  There is nothing you can do about that.

An external datawindow acts the same as any other datawindow except that Retrieve() and Update() calls fail since there is no datasource.  You can still Find(), InsertRow(), DeleteRow(), etc. just like any other data.  For persistence, you'll need to handle populating and saving the data yourself.

Assisted Solution

berXpert earned 300 total points
ID: 12338680
Hi mayuri25,

You made a lot of questions here, what I guess from first reading is that you have a single DW in a window where you are retrieving data from a table (the one you attached directly in SQL Select ) or is blank (if you build it as external), next you add rows and you want to insert them not the first table but in other table using the stored procedure you place in Update property of DW.

If this is what you want I don't know if it will work, but I can give you a turn around.

Build a 2nd datawindow and attach the destination table directy in SQL Select.
In your button script where you are trying to update put a clode like this:

Integer li
DataStore lds_destination

lds_destination Create DataStore
lds_destination.DataObject = 'dw_your_2nd_datawindow'   // put the name of your 2nd DW

// dw_1 is the DW placed in your window, it has your 1st table or an External DW
for li = 1 to dw_1.RowCount()


   // we are going to copy manually all fields from DW_1 to your DW with destiantion table, i.e    Name, Salary, Days of work
   lds_destination.Object.Name[ li ]  = dw_1.Object.Name[ li ]
   lds_destination.Object.Salary[ li ]  = dw_1.Object.Salary[ li ]
   lds_destination.Object.DaysOfWork[ li ]  = dw_1.Object.DaysOfWork[ li ]

netx li

// Now to insert this rows into destination table simply call update

I hope this helps


Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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.

581 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