Solved

datawindow row update properties

Posted on 2004-10-06
4
860 Views
Last Modified: 2013-12-26

Hi,

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.

Thanks

0
Comment
Question by:mayuri25
4 Comments
 
LVL 5

Accepted Solution

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

1.
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.

2.
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.
0
 
LVL 5

Assisted Solution

by:berXpert
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
lds_destination.SetTransObject(SQLCA)

// 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()

   lds_destination.InsertRow(0)

   // 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
lds_destination.Update()



I hope this helps

BerX
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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 (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
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 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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now