Laszlo Csabi said:
Hi Folks,
Can someone explain me why I'm getting the following error?
Try the following call to the overloaded FillDataset (notice the 2nd
parameter in the method):
SqlHelper.FillDataset(
conn,
CommandType.StoredProcedure,
"MySp",
ds,
new string[] { "TableName" },
new SqlParameter[] {
new SqlParameter("@Param1", Value),
new SqlParameter("@Param2", Value2)
}
);
Another test would be (Value and Value2 are actual values, not SqlParameter
objects):
SqlHelper.FillDataset(
conn,
"MySp",
ds,
new string[] { "TableName" },
new object[] { Value, Value2 }
);
The difference is you specify that it is a stored procedure you want to use
to fill the dataset with.
Hope this helps!
Mythran