15,923,051 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Sathish kumar M S (Top 8 by date)
Sathish kumar M S
1-Aug-14 6:14am
View
Thank you!
when i using your code it is showing error message like this
Error 29 Cannot apply indexing with [] to an expression of type 'object'
Sathish kumar M S
18-Jul-14 4:55am
View
actually I converted code from vb.net to c#
my vb.net code is
Public Overloads Shared Function ExecuteHashTable(ByVal connection As SqlConnection, _
ByVal commandType As CommandType, _
ByVal commandText As String) As Hashtable
Dim oDataReader As System.Data.SqlClient.SqlDataReader
Dim oHashTable As New Hashtable()
oDataReader = ExecuteReader(connection, commandType, commandText, CType(Nothing, SqlParameter()))
Do While oDataReader.Read
oHashTable.Add(CStr(oDataReader.Item(0)).Trim, CStr(oDataReader.Item(1)).Trim)
Loop
oDataReader.Close()
Return oHashTable
End Function
Sathish kumar M S
18-Jul-14 4:53am
View
showing same error message
Sathish kumar M S
18-Jul-14 4:50am
View
error msg showing like this
Sathish kumar M S
18-Jul-14 4:49am
View
Error 62 'System.Data.SqlClient.SqlDataReader' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Data.SqlClient.SqlDataReader' could be found (are you missing a using directive or an assembly reference?)
Sathish kumar M S
18-Jul-14 2:21am
View
in this below line
oHashTable.Add(oDataReader.Item[0].ToString().Trim, oDataReader.Item[1].ToString().Trim);
Sathish kumar M S
17-Jul-14 9:23am
View
Its working Thank you Valery!
Sathish kumar M S
17-Jul-14 8:24am
View
showing same error
Show More