datawindow row update properties

Posted on 2004-10-06
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
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

Accepted Solution

michaelstoffel earned 75 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 75 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

740 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