What’s wrong with these parameters?

Simply ask google, I guess more than 10000 hits is quite impressive. Your argument “I don’t think that…” is not valid until you proved it.

This is what MSDN says:

The OLE DB.NET Provider does not support named parameters for passing parameters to an SQL statement or a stored procedure called by an OleDbCommand when CommandType is set to Text. In this case, the question mark (?) placeholder must be used. For example:

SELECT * FROM Customers WHERE
CustomerID = ?

Therefore, the order in which OleDbParameter objects are added to the OleDbParameterCollection must directly correspond to the position of the question mark placeholder for the parameter in the command text.

Leave a Comment

tech