Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataView/DataSet/DataReader
Message
De
08/01/2007 11:59:33
 
 
À
08/01/2007 10:18:06
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01183234
Message ID:
01183476
Vues:
44
>I just panic.
>If I do this...
>
> strQuery = rdr["maxordamt"].ToString();
> namt = int.Parse(strQuery);
>
>It seems to work.
>I guess I just need to be more creative and put more thought into what I'm doing with C#.
>
>
>lnAmt = rdr["maxordamt"] gave me "Cannot implicitly convert object into string..." error message.

I think this is related because this is not a datarow. I would suggest you use a datarow as you will be able to deal directly with the content of the field as is.

As soon as you have a dataset, you can scroll into it like this:
        For lnCounter = 0 To lnYourRecordCountOfTheDataSetHere
            loRow = loDataProvider.oDataSet.Tables(YourAlias).Rows(lnCounter)
            lnAmount = loRow("MaxOrdAmt")
        Next
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform