Jump to content
Lars Fosdal

Continua: Weird DUnitX ODBC issue on Windows Server 2019

Recommended Posts

I just discovered a very weird bug. 

We have a build server running FinalBuilder og Continua CI, and the build process executes a DUnit test app.  This week, two of the 600+ tests failed with the error:



Exception: [FireDAC][Phys][ODBC][Microsoft][ODBC SQL Server Driver]
Procedure or function p_upsert_customers has too many arguments specified.


So, we thought- Developer error - perhaps we have a mismatch between the Delphi code stuffing parameters and the parameters of the stored procedure?

Nope - that was not the reason. So we checked the source code, deleted all logs, deleted all .exe files, delete all 13k .dcu files that Continua had cached, and ran it again.

Still the same error.  Recompiled the DB stored proc. Rebooted the app server. Rebooted the DB server.  Still the same error.

I ran the app manually from a PowerShell prompt, and to my surprise, it did NOT report an error.


The unit test used the DUnitX stage action in Continua - and invoked a .cmd file that just launched the test app with some command line params.


So - I modified the action to be a .ps1 script and changed the action to run the .ps1 script instead of the .cmd script- and No Errors.

I then modified the DUnitX action to directly invoke the exe and pass the params, and No Errors.


So - why does the same 32-bit application apparently use different ODBC drivers when run from a cmd prompt, vs run from a powershell prompt?


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now