Problems with stored procedures in a datawindow

Hi-
I'm using an external datawindow which uses stored procedures for insert,=20
delete and update.
I always insert a row and if I want to delete or modify a row, I fill in=20
the datawindow with the corresponding information. In order to execute the =
appropriate stored procedure, I change the status flags of the row to=20
DataModified! using the SetItemStatus method (and call the deleteRow()=20
method if I want to delete the row). After that, I set the transaction I=20
want the datawindow to use and call the datawindow's of=5Fupdate() method.
It executes the stored procedure for insert but it doesn't do the same with=
=20
the stored procedures for update and delete.
Can somebody help me with this?

Many thanks,
David V=E1zquez
0
Anonymous
12/19/2000 9:44:38 PM
📁 sybase.powerbuilder.datawindow
📃 28057 articles.
⭐ 5 followers.

💬 1 Replies
👁️‍🗨️ 1028 Views


You probably have not set update status for your DW.
This at least will explain Delete. Because without update
properties PB will not create the Delete buffer.
I tried what you did and in my case it works.
All your rows originally get status New!.
In order to execute delete for the row you also
have to change its status to DataModified! because
PB will not attempt to delete a row (even its in the Delete
buffer) which has status New! or NewModified! because
(naturally) PB assumes that such row has never been
in the DB.
You cannot change the row status from NewModified!
to DataModified! in one statement. Use the next two
statements:
==================================
dw_1.SetItemStatus(1, 0, Primary!, New!)
dw_1.SetItemStatus(1, 0, Primary!, DataModified!)
==================================.
Summary:
1.    Set update properties - check "Allow Updates"
        and enter any name into "Table To Update".
2.    For rows to be deleted change status to DataModified!
3.    Use two indicated above statements to change a row status.
    Regards, Vladimir


Anonymous@sybase.com wrote:
> Hi-
>
> I'm using an external datawindow which uses stored procedures for insert,
> delete and update.
>
> I always insert a row and if I want to delete or modify a row, I fill in
> the datawindow with the corresponding information. In order to execute the
> appropriate stored procedure, I change the status flags of the row to
> DataModified! using the SetItemStatus method (and call the deleteRow()
> method if I want to delete the row). After that, I set the transaction I
> want the datawindow to use and call the datawindow's of_update() method.
>
> It executes the stored procedure for insert but it doesn't do the same with
> the stored procedures for update and delete.
>
> Can somebody help me with this?
>
> Many thanks,
>
> David V�zquez
0
Vladimir
12/19/2000 11:15:07 PM
Reply: