Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find method of DataRowCollection
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00698365
Message ID:
00698399
Vues:
10
Are you sure that variable "row" is declared as "dim row as datarow" and not as "dim row as datarow[]"? I am not a VB guy..just throwing a thought here.

As per the error you are getting, it seems like it is trying to cast datarow object with datarow array.

>Hi,
>
>Every time I try to use the find method of the datarowcollection, I get an error message: Value of type 'System.Data.DataRow' cannot be converted to '1-dimensional array of System.Data.DataRow'.
>
>I'm not sure what this means, I've been following the code straight out of a Microsoft Press book and the code samples don't work. Is this something that is only available to strongly typed datasets? I am using untyped datasets in a remoting scenario.
>
>Here's an example:
>
>dim row as datarow
>dim PrimaryKeyNumber as int32
>PrimaryKeyNumber = 1
>
>row = dsData.Tables("Foo").Rows.Find(PrimaryKeyNumber)
>
>Has anyone else had this same problem? What am I missing?
>
>Thanks,
>
>Rodney
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform