Article View: borland.public.csharpbuilder.language.csharp
Article #273Re: [C# Error] WinForm.cs(300): 'Borland.Data.Provider.BdpDataReader'does not contain a definition for 'Item'
From: Terentius Neo
Date: Mon, 19 Dec 2005 17:29
Date: Mon, 19 Dec 2005 17:29
17 lines
1552 bytes
1552 bytes
Terentius Neo wrote:
>
> Can anybody explain why I in the earth do I get this error message? The
> piece of code is below.
>
> private void PrintResult( BdpDataReader reader ) {
>
> using (StreamWriter sw = new StreamWriter("C:\\temp\\TestFile.txt"))
> {
> for ( int i=0; i< reader.FieldCount; i++ ) {
> sw.Write(reader.Item[i].ToString); //<<< here is the error
> }
> }
> }
Found a solution: I should use
sw.Write(reader.GetValue(i).ToString());" instead.
Technical Details
Message-ID:
<43a6ed93$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43a6d76c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,1b40ce50bfcdf0f2 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 19 Dec 2005 19:29:09 +0200 From: Terentius Neo <unknown@user.domain> User-Agent: Thunderbird 1.4.1 (Windows/20051006) MIME-Version: 1.0 Newsgroups: borland.public.csharpbuilder.language.csharp Subject: Re: [C# Error] WinForm.cs(300): 'Borland.Data.Provider.BdpDataReader'does not contain a definition for 'Item' References: <43a6d76c$1@newsgroups.borland.com> In-Reply-To: <43a6d76c$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.221.66.91 Message-ID: <43a6ed93$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1135013267 80.221.66.91 (19 Dec 2005 09:27:47 -0700) Lines: 17 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail