Click here to Skip to main content
15,902,299 members

Comments by Sherif Kamel (Top 23 by date)

Sherif Kamel 26-Jul-16 11:00am View    
Sure sir , I already updated the code and here's the working sql cmd "SELECT AKtype, COUNT(AKtype) AS AKcount FROM Aklashehat GROUP BY AKtype ORDER BY AKcount"
Sherif Kamel 26-Jul-16 10:53am View    
Sir, I found it out , I should specify an alias for count ( COUNT(AKcount) AS COUNT ) and use it in order by ( ORDER BY AKcount ). Thanks sir for directing me to the right path , and please update your answer kindly.
Sherif Kamel 26-Jul-16 10:43am View    
SqlCeCommand cm = new SqlCeCommand("SELECT AKtype, COUNT(AKtype) FROM Aklashehat GROUP BY AKtype ORDER BY COUNT(AKtype)", sqlcon);
Sherif Kamel 26-Jul-16 10:40am View    
Well, I tried it with SQL CE cmd and It worked perfect, but I still can't get it to work in my application
Sherif Kamel 26-Jul-16 10:35am View    
There's an error produced " Expressions in the GROUP BY list cannot contain aggregate function" ? Is this something related to SQL Compact Server or Am I doing something wrong in the listview. *Sorry for the late reply, but I was trying to figure it out on my own