Powerbuilder dynamic datawindow update




















If you want this client to always INSERT a new record, and adjust the primary key values appropriately so you won't overwrite or conflict with existing data, I'd suggest look to see whether your DBMS supports identity or sequence values for your key column, and look at the Identity Column feature on the DataWindow's Update Properties dialog.

If you look in your datawindow, you'll notice by default the columns used by the Update are all of the editable columns. You can change that to just the primary key. This would allow your update to "work", but it will also overwrite the other person's changes. It sounds like your PK is too generic. You might want to look at a unique, sequence driven approach.

InsertRow 0 ; This would insert the row at the end. Also you may want to use the SetRow or ScrolltoRow in-order to make it the current row. So what you're saying is that some other user has inserted the row. Then you must do another check just before you call update on datawindow. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. You can set the update table and the column update characteris I am sorry for the long message. But to explain things, I needed to do that. I copied the code from pbdwrmt. I am using a datawindow which has multiple drop down datawindows.

None of them has retrieval arguments. The retrieval of the main datawindow worked fine and the drop down datawindows showed data. But I see "error on Page" in the browser status bar when th page is loaded. I have an update button in th Your description is difficult to understand due to the terminology. First, a datawindow is assigned to a control - either a datawindow control or a datastore.

Second, the Modify function can only be called within a script. With that as a basis, can you rephrase the question and describe more precisely what you want to do? DataWindows and datawindow objects Difference between Datawindow and datawindowobjects? Not exactly; DW Control is a "container" that reserves real-estate on the surface of a visual object.

DW Obj Dynamic Datawindow Update property. We create our main datawindow dynamically with simple SQL. There has been a request to Join a column from another table not allowing this column to be updateable. The problem I'm encountering is: Once the datawindow is created it is not updateable.

I have tryed various things In that case, PowerBuilder takes the values from the primary key defined on the table and other defaults. You will see a dialog box as shown below. If the DataWindow contains only one table, PowerBuilder automatically turns on ' Allow Updates ' property and selects the table.

You need to turn on this property and select the table name you want for the Update function. The meaning of 'Key Columns' is, columns specified in the 'primary key' for the table.

Let's take an example. If you select ' Key and Modified Columns ':. If you select ' Key and Updateable Columns ':. The problem I'm encountering is: Once the datawindow is created it is not updateable.

I have tryed various things Nothing seems to work. Any suggestions or answers. At this point I'm grabbing for anything. Thanks inadvance!

See related articles to this posting. If the SQL source for a datawindow includes more than one table, the datawindow is non-updateable by default. Similar Artilces: PowerBuilder 7. Anyone experience this problem?

Our only workaround is to export the object to text, modify it manually, and then re-import the object. We're concerned that this is too dangerous and could possibly corrupt the object. Thanks, Check the documentation Update properties on datawindow columns not updated when changed When I initially add an updateable datawindow and set the update column properties, everything works fine.

If I then go back into the update column properties and CHANGE which ones are updateable, it doesn't subsequently change the underlying datawindow. The properties ARE updated and stored correctly, however, so when you go back in to edit them again it looks correct. The typical Powerbuilder Mantra that I am oh so used to save, close, reboot, open doesn't fix this one



0コメント

  • 1000 / 1000