Error:Object must implement IConvertible

B

Bob Frasca

I'm trying to execute a datareader that calls a SQL Server stored procedure
and I get this error. I also tried loading a dataset using the database
adapter Fill method and I get the same error.

I have other ASPNET applications that do these things without a problem.

Anyone have any suggestions?
 
B

Bob Frasca

For the thread...if anyone's interested.

I resolved this problem. I was passing a parameter to my stored procedure.
I was incorrectly assigning the value to a "varchar" parameter.

Incorrect:

SqlCommandObject.Parameters("@Param").Value = txtTextBox

Correct:

SqlCommandObject.Parameters("@Param").Value = txtTextBox.Text

When it attempted to execute the datareader or the Fill method, SQL Server
(or was it ADONET) was attempting to convert a text box object to a varchar
instead of a text string object to a varchar.

An example of ambiguous naming conventions biting me in the ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top