0
votes

What is the autocummit and SetTransObject() in powerbuilder is there any relation between them, why sql server is non autocummit mode and oracle is in autocummit mode, how the values for autocummit is processed. What is the function of SetTransObject();

TIA :)

2
You might want to read this: linkEduardo G.

2 Answers

0
votes

SetTransObject is a datawindow method to establish a connection between itself and a database transaction object (the global trans object is SQLCA). Generally datawindows are 'connected' to the trans object soon after instantiation.

Autocommit is a connection parameter used in establishing a connection by the transaction object (SQLCA) to the database. This parameter controls whether PowerBuilder issues SQL statements inside or outside the scope of a transaction.

If the value is true the datawindow issues SQL statements outside the scope of a transaction. A COMMIT is issued after every successful SQL statement.

If the value is false the datawindow issues SQL statements inside a transaction. A BEGIN TRANSACTION statement is issued when the connection is started and also after every COMMIT or ROLLBACK statement.

0
votes

settransobject() tells the Sql connection details to Datawindow, so that on retrieve & update it uses specified sql connection using the transaction object. Build in transaction object is SQLCA . configure its attributes for db connection.

Autocommit: if set to true, will not require commit statement to put after sql statements in code. If set to false, will require commit statement. this is done so as to encourage use of transaction rollback if error and commit if no errors occur .Autocommit is a attribute of SQLCA transaction object.