I'm trying to save the data from a binary file of unknown type and size to SQL server.
Code Block
cmd.Parameters.Add(
new SqlParameter(
"@filedata",
SqlDbType.VarBinary,
filebytes.Length,
ParameterDirection.Input,
false,
0, 0,
"",
DataRowVersion.Current,
filebytes));
This parameter is part of the following StoredProcedure:
Code Block
PROCEDURE
[SCHEMA NAME REMOVED].[spStoreBankReport]
@filedate
DATETIME,
@filename
VARCHAR(55),
@filedata
VARBINARY(MAX)
AS
INSERT INTO PositivePay.tblBankReport VALUES(@filedate,@filename,@filedata)
However, when it runs, I get an error that there's the procedure has too many arguments. I've made sure to fill out similar SqlParameter objects for all three parameters...