•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 391,661 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,845 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1165 | Replies: 3
![]() |
•
•
Join Date: Feb 2007
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
I want to select single value from Table and display in lable.
I wrote a program :-
But This is not working.
and Display error:
Error 1 'Reader' is a 'variable' but is used like a 'method'
It can be solve? Any other solution is possible?
I wrote a program :-
protected static string ConStr = "Data Source=URJIT6;Initial Catalog=Employee;Integrated Security=True";
protected SqlConnection NewCon = new SqlConnection(ConStr);
String QStr = "SELECT Username FROM Register WHERE LoginID=' " + LoginIdtxt.Text.ToString() + "'";
SqlCommand SqlCmd2 = new SqlCommand(QStr, NewCon);
NewCon.Open();
SqlDataReader Reader;
Reader = SqlCmd2.ExecuteReader();
Reader.Read();
l1.Text =Reader("Username");But This is not working.
and Display error:
Error 1 'Reader' is a 'variable' but is used like a 'method'
It can be solve? Any other solution is possible?
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Bored? Visit http://www.kaelisspace.com/
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
- Flash Player stop working since Ad-aware (Web Browsers)
- Internet Explorer not working. (Web Browsers)
- Flash Player stop working and won't reinstall (Windows NT / 2000 / XP / 2003)
- messanger not working. (Web Browsers)
- cd burner not working (Storage)
- Working on new design (DaniWeb Community Feedback)
Other Threads in the ASP.NET Forum
- Previous Thread: Create Table on SqlServer Through Asp.net coding
- Next Thread: Web Services and SSL


Linear Mode