By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.