hopeful
Member
I have noticed this error appearing a lot on the web so I thought I would share my experience.
I am getting it from an SQLCommand and I suspect that it is related to an output parameter. In my case I suspect that it is because the data type for my parameter is not set properly, and the REASON for this is that I am relying on a call to SQLDataReader.GetSchemaTable which is returning the WRONG data type for an identity column. The column is a long integer in the database, but according to the schema table returned by ADO it is a byte (tinyint). I suspect this is the ultimate reason for the problem.
I will update this if I find out more, otherwise I hope the above may help others.
I am getting it from an SQLCommand and I suspect that it is related to an output parameter. In my case I suspect that it is because the data type for my parameter is not set properly, and the REASON for this is that I am relying on a call to SQLDataReader.GetSchemaTable which is returning the WRONG data type for an identity column. The column is a long integer in the database, but according to the schema table returned by ADO it is a byte (tinyint). I suspect this is the ultimate reason for the problem.
I will update this if I find out more, otherwise I hope the above may help others.