Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP to return a cursor
Message
De
05/08/2009 18:51:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
01416077
Message ID:
01416371
Vues:
43
>>Interesting, this
>>
>>Dim myval As Decimal = oReader("priorpmt")
>>Response.Write(myval.ToString("$ #0,0.00"))
>>
>>will work, but
>>
>>Response.Write(oReader("priorpmt").ToString("$ #0,0.00"))
>>
>>will not. So it looks like the reader is presenting a string and not a number.
>
>As far as I know, oReader returns an Object. May be that's why the extra variable is important. Can you try oReader("myField").Value.ToString... ?
>
>Actually, see OleDbDataReader..::.GetDecimal Method http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader.getdecimal.aspx
>
>Looks like this is what we want to use here - try to find examples.

You may be right, but I find the NET documentation extremely difficult to follow. This
	RetVal += "<td>" + oReader("priorpmt").GetDecimal.ToString("$ #0,0.00") + "</td>"
Does not work. "Error says Public member 'GetDecimal' on type 'Decimal' not found."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform