473,587 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Value of type 'System.Data.Da taRow' cannot be converted to '1-dimensional array of System.Data.Dat aRow'

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

I have previously read in the xml doc with
myDataSet.ReadX ML(Server.MapPa th("bills.xml") )

Then when i com to this section..

Dim myTable As DataTable
Dim myRow as DataRow

myTable = myDataSet.Table s("djg_Bills" )
myRow=myTable.N ewRow()

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

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

Any help would be appreciated.

Thanks // Martin Lindén
Nov 11 '05 #1
1 17038
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******** ******@TK2MSFTN GP12.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.ReadX ML(Server.MapPa th("bills.xml") )

Then when i com to this section..

Dim myTable As DataTable
Dim myRow as DataRow

myTable = myDataSet.Table s("djg_Bills" )
myRow=myTable.N ewRow()

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

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
3200
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
5111
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. And K&R2 mentions "signed extension" everywhere. Reading some old clc posts, I've beginning to realize that these books are over-generalizing the topic. I am just wondering what the difference between the following pairs of terms are: 1)...
2
2779
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: "Object type cannot be converted to target type." The property Value of newField = 'ArrayList' and val also shows as ArrayList'.
0
2056
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 get placed in a common directory that is referenced by my ASP.NET app. Occasionally I receive the following error: value of type "MyNamespace.MyClassName" cannot be converted to "MyNamespace.MyClassName" (there are a lot of these for different...
9
41931
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 occurs in only one component/project that accesses the 'x' object whereas several other components/projects also use the 'x' object in several other locations in exactly the same way without any problems. If I Rebuild
4
4171
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 this before but I cannot remember the solution, anybody got any help?
2
7201
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 'ASP.multiclasses_aspx.VehicleKey'. Source Error: Line 106:
2
8729
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 that I get the whole time this error: "value of type 'T' cannot be converted to 'clsBaseClass'". I get it with both CType and Directcast:
4
2372
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 have this simple interface : interface IInitializable { void Init();
69
3295
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
7924
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7854
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
7978
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.