I have troubles get this to work.
I have a leave trigger on a numeric editor; this causes a find in the database and the creation of a temp-table record. This temp-table is bound to a datasource.
Now the values should be displayed in the datafields, but nothing happens.
Do I miss a method here?
Josef Resperger
You said, the temp-table is bound to the datasource. I assume, that a query is used as the Handle of the binding source.
You need to add the new record to the result-list of the query using the CREATE-RESULT-LIST-ENTRY() method of the query. Then you might need to execute the Refresh() method of the Bindingsource.
If that does not work, you should log a bug with tech support and provide sample code ASAP (they are fixing the release)...
I've logged an issue with Refresh() not working properly as Bug OE00176912.
RefreshAll() does work, but would require you to reposition the binding source to the new row.
No, the temp-table is bound to the data-source not a query.
Actually this is a maintenancemodule. So only one record is read in, modified or created at at time.
And Refreshall() does not work in that case.
I can't find a sample for such a scenario either.
Thanks for your answer.
Sorry, I don't fully understand what you are doing here.
Are you using a ProBindingSource at all? Which object is the source (Handle property of the ProBindingSource instance)?
It can't be a temp-table. Is it a BUFFER, a QUERY or a ProDataset?
I did all this in the Visual Designer what was generated was:
tableDesc1:ChildTables = ?.
@VisualDesigner.FormMember (NeedsInitialize="false", InitializeArray="true").
define variable arrayvar5 as Progress.Data.ColumnPropDesc extent 3 no-undo.
arrayvar5[1] = new Progress.Data.ColumnPropDesc("gw-prozen[1]", "Field1", Progress.Data.DataType:DECIMAL).
arrayvar5[2] = new Progress.Data.ColumnPropDesc("gw-prozen[2]", "Field3", Progress.Data.DataType:DECIMAL).
arrayvar5[3] = new Progress.Data.ColumnPropDesc("gw-prozen[3]", "Field4", Progress.Data.DataType:DECIMAL).
tableDesc1:Columns = arrayvar5.
this-object:bgewich:TableSchema = tableDesc1.
As to my understanding this should point to the temp-table buffer. Otherwise the declaration in the Visual Designer would not make sense?
That's just the design time schema. That has nothing to do with the runtime.
And the binding source? I assume you have dropped a Progress.Data.BindingSource to the design canvas and it's shown on the yellow area under the design.
Are you (manually in source code) assigning a value to the Handle property of bindingSource1 somewhere? Could you post that code here? Or are you NEWing a binding source instance somewhere?
I don' get it to work.
I attach my source.
Thanks for your help, It is very appreciated.
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/hh2061.cls:550:0]
Ok. Your binding source seems to be bgewich.
And you set a variable h-buffer to a buffer of that temp-table.
Did you try, what happens when you set bgewich:Handle = h-buffer as the last line of the constructor?
Unfortunatelly this does not change anything.
Maybe it has to do that these fields are an extent?
I never tried creating rows and I also never really used the binding source with a buffer.
I'd try to create a query for the buffer
CREATE QUERY hQuery.
hQuery:SET-BUFFERS (h-buffer).
hQuery:QUERY-PREPARE ("FOR EACH " + h-buffer:NAME).
hQuery:QUERY-OPEN ().
bgewich:AutoSync = True.
bgewich:Handle = hQuery.
In that leave trigger:
h-buffer:BUFFER-CREATE().
hQuery:CREATE-RESULT-LIST-ENTRY().