TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vandana
1.2k
590
76.2k
how to create a method with sql in class file
Sep 7 2016 4:20 AM
hii all,
i have started to work on 3 tier architecture i have some problem.
1) I have a table name is Teamname having some data.
with the help of sql query i have retrived the teamname.
like
already define connection string
string query="Select Teamname from Teamname where status='ACtive'",
sqlcommannd cmd=new sqlcommand(query,con);
if(con.state==connectionstate.open()
{
con.close()
}
con.open();
sqldatareader dr=cmd.executeReader();
if(dr.hasRows())
{
returns the teamname ?????? this is how to do it
}
on another webpage onload I want to Bind it in a grid view
so how to do it. suggest me write appropriate code.
thanks in advance
Reply
Answers (
2
)
Purpose of Virtual method in C#
Reading data from 2 files and Creating .csv file with it