# Database drivers: Stored procedures and transactions

**URL:** <https://forums.softvelocity.com/t/database-drivers-stored-procedures-and-transactions/1640>\
**Category:** Knowledge Base\
**Tags:** database-drivers\
**Created:** [November 9, 2026, 11:38am UTC](https://forums.softvelocity.com/t/database-drivers-stored-procedures-and-transactions/1640 "2026-11-09T11:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rzaunere](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rzaunere](https://forums.softvelocity.com/u/rzaunere)\
**Post date:** [November 9, 2026, 11:38am UTC](https://forums.softvelocity.com/t/database-drivers-stored-procedures-and-transactions/1640/1 "2026-11-09T11:38:30Z")

</div>

Part of [Database drivers: the hub](https://forums.softvelocity.com/t/database-drivers-the-hub/1652). 31 entries under this heading; every entry opens as its own topic.

- [MS SQL: wrapping updates to several tables in one LOGOUT / COMMIT / ROLLBACK, as with TPS](https://forums.softvelocity.com/t/ms-sql-wrapping-updates-to-several-tables-in-one-logout-commit-rollback-as-with-tps/1223) - UseLogout = false, one transaction per connection, keep it short.
- [Firebird: a stored procedure called through PROP:SQL does not save its changes](https://forums.softvelocity.com/t/firebird-a-stored-procedure-called-through-prop-sql-does-not-save-its-changes/1224) - commit it yourself.
- [Calling a stored procedure with an OUTPUT parameter through PROP:SQL: "Cannot use the OUTPUT option when passing a constant"](https://forums.softvelocity.com/t/calling-a-stored-procedure-with-an-output-parameter-through-prop-cannot-use-the-output-option-when-passing-a-constant-to-a-stored-procedure/1225) - the CALL form with a bound variable.
- [Error 56 "LOGOUT already active"](https://forums.softvelocity.com/t/error-56-logout-already-active-finding-the-logout-without-a-commit/1226) - find the unmatched LOGOUT with the driver trace.
- [Stored procedure with [INOUT] parameters returned 22001 (Reported, not reproduced)](https://forums.softvelocity.com/t/calling-a-stored-procedure-with-inout-parameters-returned-22001-string-data-right-truncation-reported-not-reproduced/1227) - separate IN and OUT parameters worked for the posters in 2010; a user report, not a confirmed defect.
- [MS SQL: reading and incrementing a "next number" row without two users getting the same value](https://forums.softvelocity.com/t/ms-sql-reading-and-incrementing-a-next-number-row-without-two-users-getting-the-same-value/1228) - a stored procedure that reads and updates inside one serializable transaction.
- [MSSQL: one user blocks another, and when the blocker exits their work since the block began is gone (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-one-user-blocks-another-and-when-the-blocker-exits-their-work-since-the-block-began-is-gone-reported-not-reproduced/1229) - read as an open transaction that was never committed; find the missing COMMIT; no cause was confirmed.
- [Two stored procedures fill a queue, one works and one does not: quote marks around string parameters in the call](https://forums.softvelocity.com/t/two-stored-procedures-fill-a-queue-one-works-and-one-does-not-quote-marks-around-string-parameters-in-the-call/1230) - string parameters need apostrophes around them in the call text you build.
- [QODBC (QuickBooks): a stored procedure sent through the ODBC driver returns no data and no error (Reported, not reproduced)](https://forums.softvelocity.com/t/qodbc-quickbooks-a-stored-procedure-sent-through-the-odbc-driver-returns-no-data-and-no-error-reported-not-reproduced/1231) - CALL was needed and the driver setting CALLODBC was tried; results are read with NEXT; no outcome was posted.
- [PostgreSQL ODBC: a deferred foreign key fails on COMMIT, then every LOGOUT returns error 48 "Unable to Log Transaction" (Reported, not reproduced)](https://forums.softvelocity.com/t/postgresql-odbc-a-deferred-foreign-key-fails-on-commit-then-every-logout-returns-error-48-unable-to-log-transaction-reported-not-reproduced/1232) - the database rolled back but Clarion kept treating a transaction as active until the program restarted; the ABC relation manager expects no error from COMMIT; no fix was found.
- [PostgreSQL: error 48 "Unable to Log Transaction" on a transaction of three updates (Reported, not reproduced)](https://forums.softvelocity.com/t/postgresql-error-48-unable-to-log-transaction-on-a-transaction-of-three-updates-reported-not-reproduced/1233) - the posters asked about the role used and whether two LOGOUTs (own code and templates) were active; no outcome was posted.
- [PostgreSQL: calling a stored procedure with PROP:SQL gives "is a procedure; Error while executing the query"](https://forums.softvelocity.com/t/postgresql-calling-a-stored-procedure-with-prop-sql-gives-is-a-procedure-error-while-executing-the-query/1234) - declare it as a FUNCTION and call it with SELECT (a function returning void for no result); NORESULTCALL was a third lead that was not tried on the failing procedure.
- [Process template handles only every second record when the code deletes the record inside a transaction](https://forums.softvelocity.com/t/process-template-handles-only-every-second-record-when-the-code-deletes-the-record-inside-a-transaction/1235) - the poster sent BEGIN TRAN, ROLLBACK and COMMIT through the file's PROP:SQL instead of LOGOUT, ROLLBACK and COMMIT; untested ideas were a delete queue and processing backwards.
- [Calling a stored procedure for every record of a file loop is slow: it is the result handling, not the procedure](https://forums.softvelocity.com/t/calling-a-stored-procedure-for-every-record-of-a-file-loop-is-slow-it-is-the-result-handling-not-the-procedure/1236) - avoid the row-by-row loop; have the server return complete result sets through a view, a temp table or one call with IN or BETWEEN; if you keep the loop, FLUSH() the dummy file.
- [MSSQL: an app blocks the database once or twice a day, only when it runs as a Windows service (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-an-app-blocks-the-database-once-or-twice-a-day-only-when-it-runs-as-a-windows-service-reported-not-reproduced/1237) - a dialog waiting for input a service never gets was the main suspect; ErrorManager logging, the debugger, Profiler and the dynamic management views were suggested; no cause was reported.
- [MS SQL: calling a stored procedure with CALL and & parameters gives "Incorrect syntax near '&'" - BIND the variables](https://forums.softvelocity.com/t/ms-sql-calling-a-stored-procedure-with-call-and-parameters-gives-incorrect-syntax-near-bind-the-variables/1238) - BIND both variables under the names written after the &, and the call worked for the poster.
- [MySQL: CALL of a stored procedure through PROP:SQL fails while UPDATE and DELETE statements work](https://forums.softvelocity.com/t/mysql-call-of-a-stored-procedure-through-prop-sql-fails-while-update-and-delete-statements-work/1239) - SEND(file,'/ODBCCALL=FALSE') before the PROP:SQL, and the call "worked perfectly"; the thread does not say why.
- [MS SQL: a stored procedure that runs many UPDATEs and a DELETE with rollback on any error, and calling it with PROP:SQL](https://forums.softvelocity.com/t/ms-sql-a-stored-procedure-that-runs-many-updates-and-a-delete-with-rollback-on-any-error-and-calling-it-with-prop-sql/1240) - Wrap the updates in BEGIN TRAN and COMMIT TRAN, test for an error after each, roll back and return 1; call it with CALL through PROP:SQL.
- [MSSQL: a NetTalk web server freezes with a list of SQL record locks after a photo upload - how to find where it stops (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-a-nettalk-web-server-freezes-with-a-list-of-sql-record-locks-after-a-photo-upload-how-to-find-where-it-stops-reported-not-reproduced/1241) - No cause was found; the posters advised proving the driver is at fault by checking each thread's stack under the debugger or BreakIn when the server freezes.
- [Transact-SQL: BEGIN...END versus BEGIN TRANSACTION...COMMIT after an IF, and where GO belongs](https://forums.softvelocity.com/t/transact-sql-begin-end-versus-begin-transaction-commit-after-an-if-and-where-go-belongs/1242) - BEGIN...END blocks the statements an IF controls, BEGIN TRANSACTION does not; combine them if both are needed, and leave GO out of code sent from Clarion.
- [MSSQL: capturing a stored procedure's return value in Clarion - end the procedure with a SELECT and call it with PROP:SQL](https://forums.softvelocity.com/t/mssql-capturing-a-stored-procedures-return-value-in-clarion-end-the-procedure-with-a-select-and-call-it-with-prop-sql/1243) - End the procedure with a SELECT of the value, call it with CALL and bracketed parameters through PROP:SQL, then NEXT; check ERRORCODE after the call.
- [MSSQL: with BUSYHANDLING=2 a Crystal Report hangs on data opened in the calling procedure (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-with-busyhandling-2-a-crystal-report-hangs-on-data-opened-in-the-calling-procedure-reported-not-reproduced/1244) - With BUSYHANDLING=2 a Crystal Report hung on data open in the caller; a PROP:SQL commit freed the locks, the cause was never settled.
- [Calling a Clarion program from a SQL trigger to update ISAM files: write to a table and let a scheduled job do it](https://forums.softvelocity.com/t/calling-a-clarion-program-from-a-sql-trigger-to-update-isam-files-write-to-a-table-and-let-a-scheduled-job-do-it/1245) - Do not run a program from a trigger; write the change to a table and let a scheduled job update the ISAM files.
- [MSSQL: one generic trigger script to stamp a change date on every table, and what to watch for](https://forums.softvelocity.com/t/mssql-one-generic-trigger-script-to-stamp-a-change-date-on-every-table-and-what-to-watch-for/1246) - Let the template write each table's identity column name into the trigger text; guard against a trigger re-firing itself, and consider a smalldatetime for the stamp.
- [MSSQL 2008 R2: a stored procedure called through a dummy file returns no rows, trace shows "Cursor concurrency changed" 01S02 (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-2008-r2-a-stored-procedure-called-through-a-dummy-file-returns-no-rows-trace-shows-cursor-concurrency-changed-01s02-reported-not-reproduced/1247) - A procedure called through a dummy file returned no rows only on SQL Server 2008R2; the trace showed Cursor concurrency changed 01S02, and no fix was found.
- [SQL Server application roles from Clarion: sp\_setapprole works, but the role password shows in the trace (Reported, not reproduced)](https://forums.softvelocity.com/t/sql-server-application-roles-from-clarion-sp-setapprole-works-but-the-role-password-shows-in-the-trace-reported-not-reproduced/1248) - sp\_SetAppRole through SEND works, but the secret appears in the trace log, and the bound CALL form failed with an ad hoc level error; EXECUTE AS untried.
- [MSSQL: getting return values from a stored procedure, and showing progress while it runs](https://forums.softvelocity.com/t/mssql-getting-return-values-from-a-stored-procedure-and-showing-progress-while-it-runs/1249) - Return values by ending the procedure with a SELECT read through PROP:SQL; show progress via a global temporary table and a second connection polling while it runs.
- [MSSQL: updating several rows in two tables in one transaction - Clarion LOGOUT around the ABC updates, or a stored procedure?](https://forums.softvelocity.com/t/mssql-updating-several-rows-in-two-tables-in-one-transaction-clarion-logout-around-the-abc-updates-or-a-stored-procedure/1250) - Keep Clarion's own transactions for low volume, use the TransactionManager template instead of hand-written LOGOUT and COMMIT, and a queue cannot be passed to a procedure without the ODBC API.
- [MSSQL: LOGOUT on one thread sets "transaction isolation level serializable" on the main thread's connection too (Reported, not reproduced)](https://forums.softvelocity.com/t/mssql-logout-on-one-thread-sets-transaction-isolation-level-serializable-on-the-main-threads-connection-too-reported-not-reproduced/1251) - A LOGOUT on one thread set serializable isolation on the main thread's connection too; the /ISOLATIONLEVEL=1 driver option was suggested but not adopted, and no cause was found.
- [Running a long stored procedure from Clarion and knowing when it has finished](https://forums.softvelocity.com/t/running-a-long-stored-procedure-from-clarion-and-knowing-when-it-has-finished/1252) - PROP:SQL cannot run asynchronously; use ODBC asynchronous execution at the API level with polling, or a windowless thread that blocks on PROP:SQL and signals when done.
- [SQL: is there a "delete without RI" like Access:Table.DeleteRecord(0) when the RI is done in triggers?](https://forums.softvelocity.com/t/sql-is-there-a-delete-without-ri-like-access-table-deleterecord-0-when-the-ri-is-done-in-triggers/1253) - Triggers always fire; steer them with a flag, use cascade constraints or a stored procedure with a parameter, and Relate Delete(True) applies dictionary RI rules.
