Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where's SqlDataReader.Item ??
Message
From
30/06/2004 16:51:28
 
 
To
28/06/2004 13:07:37
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00918060
Message ID:
00919369
Views:
13
>I am using a SqlDataReader to retrieve SQL Server data. The datareader is reported to have a public Item property, but I can't access it. I see example after example using the Item property, but it does not show in intellisense for me. I am using dr.GetInt32(dr.GetOrdinal("UnqKey")) instead of simply dr("Unqkey") or dr.Item("Unqkey"). When I use the latter, I get the message 'dr' denotes a variable where a 'method' was expected.
>
>Any idea what's going on? Thanks.

Are you using C#? If so you need to use square brackets for array indexers.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform