473,396 Members | 1,706 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,396 software developers and data experts.

No accessible overloaded 'DataRowCollection.Add' can be called without a narrowing conversion.

What do I need to do to add a row to a table with single column? I got the
"mnarrowing conversion" ewrror mesage.

Thanks

Bill

-----------------

Dim rValue(0) As Object

rValue(0) = CInt("1001")

dS.Tables(0).Rows.Add(rValue(0))

Error:
Additional information: No accessible overloaded 'DataRowCollection.Add' can
be called without a narrowing conversion.
Apr 10 '06 #1
2 4233
The Add method is expecting an Array of type Object, not one element of an
Array of type Object.

ds.Tables(0).Rows.Add(rValue)

should work.

Tony

"Bill Nguyen" wrote:
What do I need to do to add a row to a table with single column? I got the
"mnarrowing conversion" ewrror mesage.

Thanks

Bill

-----------------

Dim rValue(0) As Object

rValue(0) = CInt("1001")

dS.Tables(0).Rows.Add(rValue(0))

Error:
Additional information: No accessible overloaded 'DataRowCollection.Add' can
be called without a narrowing conversion.

Apr 10 '06 #2
Thanks Tony;
This works well.
one more thing, can I sort the DS.Tables(0) after adding this new row?

Bill
"tlkerns" <tl*****@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.com...
The Add method is expecting an Array of type Object, not one element of an
Array of type Object.

ds.Tables(0).Rows.Add(rValue)

should work.

Tony

"Bill Nguyen" wrote:
What do I need to do to add a row to a table with single column? I got
the
"mnarrowing conversion" ewrror mesage.

Thanks

Bill

-----------------

Dim rValue(0) As Object

rValue(0) = CInt("1001")

dS.Tables(0).Rows.Add(rValue(0))

Error:
Additional information: No accessible overloaded 'DataRowCollection.Add'
can
be called without a narrowing conversion.

Apr 10 '06 #3

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

Similar topics

5
by: Andy Jarrell | last post by:
I'm trying to inherit from a specific class that has an overloaded operator. The problem I'm getting is that certain overloaded operators don't seem to come with the inheritance. For example: ...
1
by: masood.iqbal | last post by:
I have a few questions regarding overloaded typecast operators and copy constructors that I would like an answer for. Thanks in advance. Masood (1) In some examples that I have seen...
14
by: Erik Frey | last post by:
Hello, Say I have the following two classes: class Base { } class Inherited : Base {
9
by: Codemonkey | last post by:
Hi, Sorry for a stupid question, but is it possible to do a narrowing conversion with an object array with Option Strict On in VB? E.g: ------------------ Dim aBase as Base() = {New...
2
by: jason | last post by:
Since going to framework 2.0 from 1.1, I'm getting error: Overload resolution failed because no accessible 'New' can be called without a narrowing conversion: On line: Dim LogInfo As New...
0
by: tshad | last post by:
I am getting the following error which makes no sense. No accessible overloaded If you look at the error, there is one overloaded function that can be called (int, string, int, int). The...
3
by: tshad | last post by:
I am getting the following error which makes no sense. I am doing this in asp.net. I get the following error: No accessible overloaded If you look at the error, there is one overloaded...
5
by: raylopez99 | last post by:
I need an example of a managed overloaded assignment operator for a reference class, so I can equate two classes A1 and A2, say called ARefClass, in this manner: A1=A2;. For some strange reason...
4
by: abendstund | last post by:
Hi, I have the following code and trouble with ambiguity due to operator overloading.. The code is also at http://paste.nn-d.de/441 snip>>
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.