Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

datawindow row update properties

Posted on 2004-10-06
4
Medium Priority
?
926 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
[X]
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
4 Comments
 
LVL 5

Accepted Solution

by:
michaelstoffel earned 300 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 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
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

610 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