Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataWindow does not have UPDATE capability

900 views
Skip to first unread message

John Ardila

unread,
Jun 16, 2003, 12:15:50 AM6/16/03
to
I have a datawindow that shows every indication that it should be able to
update correctly. It updates within the Painter just fine, however, for some
strange reason, I can't seem to undo it in the Painter afterwards -- I get a
validation error when I cursor out of the field.

When I check the update-properties, all looks fine. The Primary Key option
is selected and that looks correct. The only field I want updated is the
only thing selected in the updateable fields list.

The field in question is not a time-stamp or datetime or date. It is a
numeric. Decimal, I believe.

I have loop going through all of the items in the datawindow and doing a
SetItem into the field that I require populating. I can see the value pop
into the field.

I have Message indicators in the code showing the correct data and row
number all along the way. It's only when it gets to the
dw_gl_source.Update() part, does it throw up all over the place and I get
the "DataWindow does not have UPDATE capability" error message.

When I check the update-properties afterward, everything looks fine.

It's not like it's losing the capability, it behaves as if it just isn't
turned on.

Assistance would be greatly appreciated.

Thanks in advance!!


Brett

unread,
Jun 16, 2003, 12:37:41 AM6/16/03
to
I have not seen this exact problem myself, but:
a) Please quote PB Version etc when posting
b) Check that a unique primary key is still correctly defined on the
database (definition matches with primary key in update properties).
In version 8.03.9704 I have had the situation where database changes have
not percolated properly through to the datawindow until I either re-booted
PowerBuilder (Simple fix) or exported the datawindow, deleted it from the
library and then imported the datawindow. Maybe editing source would have
fixed it too..
Can't hurt to try the above and its worked for me a couple of times.

Brett

"John Ardila" <ardil...@hotmail.com> wrote in message
news:OHD%23%2377MDHA.187@forums-2-dub...

Bruce Armstrong [TeamSybase]

unread,
Jun 16, 2003, 9:48:48 AM6/16/03
to
Is this a PFC based application?

"John Ardila" <ardil...@hotmail.com> wrote in message
news:OHD%23%2377MDHA.187@forums-2-dub...

John Ardila

unread,
Jun 16, 2003, 11:07:58 AM6/16/03
to
I tried the export/delete/import that you suggested, and that no-workee.

This is that code that is failing:

for ll_row = 1 to dw_gl_source.rowcount()
MessageBox("ll_row", String(ll_row))
MessageBox("ll_export_id", String(ll_export_id))

dw_gl_source.setItem(ll_row,'pa_eh_id',ll_export_id)

if dw_gl_source.GetItemStatus(ll_row, 0, Primary!) = NewModified! then
dw_gl_source.SetItemStatus(ll_row, 0, Primary!, NotModified!)
end if
next

li_rc = dw_gl_source.Update()

I doubt that it's code oriented, but maybe...

"Brett" <brettatweaversoftdotcom> wrote in message
news:OCcFNI8MDHA.349@forums-2-dub...

John Ardila

unread,
Jun 16, 2003, 10:06:11 AM6/16/03
to
My PB version is 7.02 on Oracle 8.17.2.0

I will attempt the export, delete, and re-import method.
Thanks!

"Brett" <brettatweaversoftdotcom> wrote in message
news:OCcFNI8MDHA.349@forums-2-dub...

John Ardila

unread,
Jun 16, 2003, 1:26:57 PM6/16/03
to
Yes, this is a PFC app.
Why do you ask?

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:#6d4J8ANDHA.339@forums-2-dub...

Bruce Armstrong [TeamSybase]

unread,
Jun 16, 2003, 2:17:56 PM6/16/03
to
PFC attempts to update every DataWindow it can find unless you use the
of_SetUpdateable (FALSE) method on it. So the issue may not be the
DataWindow that you're trying to update. It may be another DataWindow on
the same window that you don't want to update, and which doesn't have update
criteria, but for which you haven't told PFC not to update.

--
Bruce Armstrong [TeamSybase]
http://www.teamsybase.com

Two new books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups

Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com

Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org


"John Ardila" <ardil...@hotmail.com> wrote in message

news:OkkQ$0CNDHA.279@forums-2-dub...

John Ardila

unread,
Jun 27, 2003, 5:25:04 PM6/27/03
to
Thanks for the advise, but that apparently is not the issue.
I have checked all DW control objects and each one has this in the
Constructor event -- this.of_setUpdateable(False).

Besides, there are two other datawindows in two other tabpages that function
just fine and their code for updating is nearly identical.

I've checked the Primary Key in the Update Properties -- OK
I've made sure that a field for updating has ben selected within Updateable
Columns.

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:eL1LjSDNDHA.187@forums-2-dub...

0 new messages