What causes "Must Implement IConvertible With Microsoft Data Application Block" error? Searching the web will produce as many solutions as questions and they are not all the same. Obviously, this error can be caused by multiple things, but it has caught me twice lately and I thought I might share the cause in my case. In fact, it caught me twice in a month for the same reason and the inordinate time that it took me to fix it the second time would lead one to question, "How often do I have to be retrained?"
In my case it has always been caused when I am passing a parameter array to the MS Application Block, SQLHelper. For example, take the following code sequence that builds a SqlParameter Array and then passes it to the SqlHelper.
| Dim arParams(1) As SqlParameter AddSqlParm(arParams(0), "@Customer", SqlDbType.Char, _ gblCustid.Trim, 8) AddSqlParm(arParams(1), "@ReturnParm", SqlDbType.Int, "O") SqlHelper.ExecuteNonQuery(ConnectionString, _ "usp_MyStoredProc", arParm) |
| SqlHelper.ExecuteNonQuery(ConnectionString, _ CommandType.StoredProcedure, _ "usp_MyStoredProc", arParm) |
| Ask a Question, or give your feedback on my articles or products by clicking on My Blog. | ![]() |