473,320 Members | 2,004 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,320 software developers and data experts.

Value of type 'System.Data.DataRow' cannot be converted to '1-dimensional array of System.Data.DataRow'

I got this example written by David J Gottlieb.
Which will not compile.

I have previously read in the xml doc with
myDataSet.ReadXML(Server.MapPath("bills.xml"))

Then when i com to this section..

Dim myTable As DataTable
Dim myRow as DataRow

myTable = myDataSet.Tables("djg_Bills")
myRow=myTable.NewRow()

The line above is the one the builder is complaining about, with an
errormessage like this
Value of type 'System.Data.DataRow' cannot be converted to '1-dimensional
array of System.Data.DataRow'

What does this mean? How can i solve the problem?

Any help would be appreciated.

Thanks // Martin Lindén
Nov 11 '05 #1
1 16979
You sure you haven't declared it like this:

Dim myTable As DataTable
Dim myRow() as DataRow

The compiler is saying that myRow has been declared as an array of datarows
but .newrow only returns one row.

Laurie Paulin
Perth, Western Australia

"Martin Lindén" <ma****@alafors.se> wrote in message
news:OX**************@TK2MSFTNGP12.phx.gbl...
I got this example written by David J Gottlieb.
Which will not compile.

I have previously read in the xml doc with
myDataSet.ReadXML(Server.MapPath("bills.xml"))

Then when i com to this section..

Dim myTable As DataTable
Dim myRow as DataRow

myTable = myDataSet.Tables("djg_Bills")
myRow=myTable.NewRow()

The line above is the one the builder is complaining about, with an
errormessage like this
Value of type 'System.Data.DataRow' cannot be converted to '1-dimensional
array of System.Data.DataRow'

What does this mean? How can i solve the problem?

Any help would be appreciated.

Thanks // Martin Lindén

Nov 11 '05 #2

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

Similar topics

12
by: Francois Grieu | last post by:
The values of ((int)0.7) and ((int)-0.7) seem to be 0 Is this independent of implementation ? TIA, François Grieu
16
by: TTroy | last post by:
Hello, I'm relatively new to C and have gone through more than 4 books on it. None mentioned anything about integral promotion, arithmetic conversion, value preserving and unsigned preserving. ...
2
by: Joe | last post by:
Hello, I'm trying to deserialize my objects (which derive from CollectionBase) using the special constructor. Everything works fine until I go to set the value. I get the following error:...
0
by: Mike Schnorr | last post by:
I have a ASP.Net application that uses assemblies from several other solutions. When testing the applications on my machine I build all the referenced assemblies using nmake. The latest assemblies...
9
by: David | last post by:
I am getting the following error during run-time compilation or a rebuild all of my application: error BC30311: Value of type 'mynamespace.x' cannot be converted to 'mynamespace.x' This...
4
by: Barry | last post by:
object type cannot be converted to target type - i am getting this error message occuring numerous times in my task list, my project compiles and runs ok but it is a nuisance, I think Ihva eheard of...
2
by: Jim in Arizona | last post by:
I'm learning form an ASP.NET 1.0 book and I tried out some code that returns this error: Compiler Error Message: BC30311: Value of type 'Integer' cannot be converted to...
2
by: DraguVaso | last post by:
Hi, I'm getting in trouble with the Generic.List(Of T). When declaring a Shadoiws of Mybase.Add, I want to do some custom actions with the item, and cast it to another class. The problem is...
4
by: Mathieu Cartoixa | last post by:
Hi, I have been annoyed in one of my recent projects with a problem related to the explicit implementation of an interface on a value type. I will take an example to show the problem. Say we...
69
by: Horacius ReX | last post by:
Hi, I have the following program structure: main ..... int A=5; int* ptr= A; (so at this point ptr stores address of A) ..... .....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.