thanks
C# .net crystal report
i have a crystal report and i want to display only the max value of id in it from the database.PLease help in this ,stuck in this for about 3-4 days..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amitesh VermaPosted Jul 12, 2012, 1:30 AM
Satyapriya NayakPosted Jul 11, 2012, 10:41 AM
Try
OleDbConnection con = new OleDbConnection(ConnectionString);
con.Open();
str = "select max(id)from tablename";
com = new OleDbCommand(str, con);
textBox1.Text = com.ExecuteScalar().ToString();
con.Close();
Thanks