
February 12th, 2006, 03:53 PM
|
|
Registered User
|
|
Join Date: Feb 2006
Posts: 6
Time spent in forums: 1 h 55 m 47 sec
Reputation Power: 0
|
|
|
SQL Statments,Ado, Access Help
hello I am haveing a small problem with some Sql statments. I have access database named 'NightCert'. i have a table
named' Info'. there is a cell named 'Points' . I need to look through all the records of 'Points' and see wich record has the most points in it. I am trying to do that here
AdoQuery1.Close;
AdoQuery1.SQL.Clear;
AdoQuery1.sql.Add('select * from Info where Points=(Select Max(Points) from Info=  aram1') ;
AdoQuery1.Parameters.ParseSQL(Adoquery1.SQL.Text, True);
AdoQuery1.Parameters.ParamByName('param1').Value:= AdoQuery1.SQL.Text;
Edit2.Text:= Adoquery1.SQL.Text;
AdoQuery1.Open;
Now the goal here is to find the record with the max points and dispaly the Name/Farm cell text in a edit.
Thanks for any help.
Grant
|