Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error:Object must implement IConvertible

Reply
Thread Tools

Error:Object must implement IConvertible

 
 
Bob Frasca
Guest
Posts: n/a
 
      07-29-2003
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?


 
Reply With Quote
 
 
 
 
Bob Frasca
Guest
Posts: n/a
 
      07-29-2003
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 ...


"Bob Frasca" <> wrote in message
news:%...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Must Implement IConvertible is a BUG non solved? lcorrias@yahoo.com ASP .Net 2 08-10-2006 03:09 AM
ERROR: Object must implement IConvertible. charleswesley@gmail.com ASP .Net 4 10-02-2005 09:56 AM
Object must implement IConvertible. =?Utf-8?B?VGltOjouLg==?= ASP .Net 1 12-15-2004 02:06 PM
Error: Object must implement IConvertible =?Utf-8?B?VGltOjouLg==?= ASP .Net 1 12-14-2004 07:29 PM
ERROR:Object must implement IConvertible. Leon Shaw ASP .Net 5 07-29-2003 02:10 PM



Advertisments