When using execProcedure with the DB_PARAM_ARRAY method, it seems that the API is not constructing the procedure call with all the necessary parameters. My SQL Server signature looks like:
ALTER PROCEDURE [dbo].[hsbi_invoice_header_insert]
(
@HSBI_INVOICE_HEADER_ID numeric(18,0) = NULL OUTPUT,
@FEED_SOURCE char(5),
@CREATED_DATE datetime,
@WEEK_ENDING_DATE datetime,
@COST_CENTER char(10),
@EMPLOYEE_ID char(11),
@SUPERVISOR_ID char(11),
@MANAGER_ID char(11),
@CLIENT_NUMBER char(15),
@ALTERNATE_CLIENT_NUMBER char(5),
@CONTRACT_NUMBER varchar(14),
@INVOICE_TYPE nvarchar(50),
@EMPLOYEE_NAME nvarchar(80),
@INSPECTOR_ROLE nvarchar(10),
@JOB_NUMBER nvarchar(50),
@PURCHASE_ORDER_NUMBER nvarchar(30)
)
AS
SET NOCOUNT ON
..etc...
SELECT @HSBI_INVOICE_HEADER_ID = SCOPE_IDENTITY();
RETURN @@Error
When I call it, it says that the @createdDate parameter is missing in the call.
When I trace the SQL using the ODBC control panel, it appears as though the meta data information is returned (or retrieved for the first three parameters but the rest are missing. The call to the stored procedure then looks like:
{? = call dbo.hsbi_invoice_header_insert( ?, ?)}
Which is obviously missing a lot of parameters. The array of parameter values I am passing to ExecProcedure contains the same number of values as there are parameters for the procedure.
Has anyone else seen this behavior? We are using SQL Server 2000 and SQL Server Driver 2000.85.1117.00 and Notes 6.5.4 for Windows