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
shameer pv
NA
55
60.1k
need help in database connectivity in c#
Aug 26 2010 7:02 AM
im beginner to c# ,asp.net and mysql
i write a program to access some data from mysql server.thats works fine
but i want to select a max value of a field. how can i access that value from data reader . i tried many ways . but...
code is given below
MySqlConnection con = new MySqlConnection();
con.ConnectionString = "Data Source=localhost;Database= mydatabase;User ID=root;Password=vox";
con.Open();
string str;
str = string.Format("select max(user_id) from usertable");
MySqlCommand cmd = new MySqlCommand(str, con);
MySqlDataReader dr;
dr = cmd.ExecuteReader();
how can i get that max value of user_id from data reader.
thanks in advance
Reply
Answers (
1
)
How to cache a gridview in ASP.Net
Combo box to upper case