Hi,
I am trying to pass a paramater to a sql server stored procedure using
$SqlCmdItem.CommandText = $("EXEC [zoomfs].[LandmarkParcelChecker]" $Shipmentreferences[$y] );
However i am getting the error
19 | … $("EXEC [zoomfs].[LandmarkParcelChecker]" $Shipmentreferences[$y] );Line |
| ~~~~~~~~~~~~~~~~~~~
| Unexpected token '$Shipmentreferences' in expression or statement.
THE SP Looks like
ALTER PROCEDURE [ZoomFS].[LandmarkParcelChecker]
-- Add the parameters for the stored procedure here
@PackageID varchar(24)
AS
BEGIN
If I have
$SqlCmdItem.Parameters.AddWithValue("@PackageID", "85800000000001252552");
I get the error
28 | $SqlAdapterItem.Fill($DataSetItem);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "Fill" with "1" argument(s): "Procedure or function 'LandmarkParcelChecker'
| expects parameter '@PackageID', which was not supplied."
If I check the value in the variable it looks set, so I am confused as to why it is saying there is nothing there?
