Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What can cause automatical commit while updating datawindow?

Status
Not open for further replies.

anna123

Programmer
Oct 24, 2002
2
CA
Hello:

I have datawindow built in runtime (PB 6.5) with the following update properties:

dw_1.Modify("DataWindow.Table.UpdateTable='" + Upper(as_table_name) + "'")

dw_1.Modify("DataWindow.Table.UpdateWhere='1'")
dw_1.Modify("DataWindow.Table.UpdateKeyInPlace=Yes")

FOR ll_index = 1 TO UpperBound(as_key_columns[])
dw_1.Modify(as_key_columns[ll_index] + ".Key=Yes")
NEXT

FOR ll_index = 1 TO ll_col_count
dw_1.Modify("#" + String(ll_index) + ".Update=Yes")
NEXT

After dw_1.Update(True, False) function, all the changes are already commited in the database. (Before I perform commit using SQLCA)!!!!!!

What can cause such automatical commit ?

:) Any help would be greatly appreciated.

Thanks in advance
Anna
 
There is as autocommit property of the default transaction object sqlca. Looks like in your case it is set to true. In your code set it to false

sqlca.autocommit = false
RT
 
Hi,

I performed transaction_obj.autocommit = false before
Update() and it didn't help. Maybe there is something in update properties of the datawindow?

Anna
 
Can you post the actual code (only the relevant part)? RT
 
I would also have said Autocommit = FALSE.

What are you doing to check that data has been commited.

The only true test is to open SQLPLUS (or similar) and examine the data.

Only other way is if the table is a view and it is commiting data behind your back. IE. through an autonomous transaction on the instead trigger.
 
Hi,

Can you try putting the code:

<trans-object>.AutoCommit = FALSE ;


BEFORE you do the dw.SetTransObject( <trans-object> )? Or rather, BEFORE you do the:

CONNECT USING <trans-object> ;


typically somewhere in the Application object where the connection takes place.

Regards,

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top