M
Mullin Yu
I need to pass a long value from C# to a sql stored procedure, but got
error: "SqlParameterCollection accepts non-null sqlParameter type objects,
not Int64)
Following is my c# coding
long lngJobID = JobID;
SqlParameter paramJobID = new SqlParameter("@JobID", SqlDbType.BigInt, 8,
ParameterDirection.Input, false, 0, 0, "JobID", DataRowVersion.Current,
lngJobID);
I can run the sp at Query Analyzer by the following
Declare @JobID as bigint
set @JobID = 20031114000001
EXECUTE GetJobItems @JobID
error: "SqlParameterCollection accepts non-null sqlParameter type objects,
not Int64)
Following is my c# coding
long lngJobID = JobID;
SqlParameter paramJobID = new SqlParameter("@JobID", SqlDbType.BigInt, 8,
ParameterDirection.Input, false, 0, 0, "JobID", DataRowVersion.Current,
lngJobID);
I can run the sp at Query Analyzer by the following
Declare @JobID as bigint
set @JobID = 20031114000001
EXECUTE GetJobItems @JobID