Challenge with Transactions

What could be causing an error like this:

Error: Undefined property: setup_self_ini::$nm_bases_access
in_array() expects parameter 2 to be array, null given

My code is something like this within onValidate of a control app:

try {
sc_begin_trans();
sc_exec_sql(“INSERT INTO sec_users …”);

		sc_exec_sql("INSERT INTO staff ....");

		// log an insert
		$y = 'inserting';
		sc_exec_sql("INSERT INTO sc_log .....");	
		sc_commit_trans();
	} catch (Exception $e) {
		sc_rollback_trans();
		sc_error_message("Unexpected error: $e");
		sc_error_exit();
	}

}

When I remove the transaction statements, it all works ok. Or is it the case onValidate section already works like transaction?

Not sure why this message as it is a php error, not a mysql error. IN control applications scriptcase will not automatically perform a commit as it will not automatically open a transaction. That only happens on form applications. So this looks like a bug to me.

Do the individual SQLs work OK? Check the first two.
As originally structured - the exception that is caught is from the commit and the commit fails if ANY of the transactioned SQLs failed.
If there is no transaction and the last SQL succeeds the exception block would not be executed.

May be the same error?

http://www.scriptcase.net/forum/showthread.php?5345-Transaction-macros-causes-error&highlight=transaction

jsb

[QUOTE=jsbinca;39388]May be the same error?

http://www.scriptcase.net/forum/showthread.php?5345-Transaction-macros-causes-error&highlight=transaction

jsb[/QUOTE]

Yes jsbinca, thank you: it’s the same error. From your response is it correct to say you have been suppressing the error message but the transaction functionality has been working as expected since Dec 16, 2013? That would be good enough for my purposes, pending any fix from Netmake.

Yes, in my cases transaction worked as expected.

jsb

[QUOTE=jsbinca;39402]Yes, in my cases transaction worked as expected.

jsb[/QUOTE]

Thanks so much…works exactly as described.