Tuesday, March 3, 2015

The dbType NVarChar is invalid for this constructor

To test some custom made mapping logic, I created a fake IDataRecord item.

However when I tried to run my test, it failed with the following error message:

clip_image002

The error message is not very explaining. The thing is that when you specify NVarChar as the dbType, you also have to specify the MaxLength. After doing that, the error was gone.

No comments: