473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Error:Object must implement IConvertible

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?
Nov 17 '05 #1
1 12152
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" <bf*****@netspoke.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matt | last post by:
I tried to display all html control types in the form. But it has run time error "object doesn't support this property or method" on document.write(obj.type); Even I do document.write('hello...
1
by: Paloma GarcĂ­a | last post by:
Dear all, I have created personalized configuration sections in my web project following the instructions described in this page...
4
by: dubing | last post by:
Hi, Our webpage uses the following JavaScript code. function toggleSubmenu(divId, link) { var div = document.getElementById(divId); div.style.display = (div.style.display == 'block') ?...
1
by: Andrew Phillipo | last post by:
I have some code that works everywhere but IE5.0, including IE5.5. Here is a snippet of where the code seems to go wrong: Location.prototype.change = function(current) { this.current = current;...
0
by: Michael Chong | last post by:
I have an (exe) executable program created in VB.NET 2003 that calls to a MFC DLL written in VC++.NET 2003. I always get an error msg "NullReferenceException: Object Reference Not Set to an...
0
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
2
by: Giovanni Bassi | last post by:
Hello All, I have encountered a problem. I am using visual inheritance and my base form adds an event handler on Form Load using the AddHandler Keyword. The problem is that if the Event...
11
by: westplastic | last post by:
This one is driving me insane. The script works perfect on Firefox, but Internet Explorer keeps complaining about "Error Object Expected" and stuff like that. I've run it through Firefox's Java...
8
by: ipy2006 | last post by:
In my HTML I have, <input type="button" class="cartonsumkey" value="Sum Cartons" onclick="sumup(this);" /> In an external file that is called in Head area, I have, function sumup( o ) { ...
6
by: Patient Guy | last post by:
I am a newcomer to using PHP but not to programming (C, C++, Javascript). I am playing around with classes and wanted to make a function that has a method simply for producing either plain text...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.