Thread View: borland.public.delphi.language.delphi.general
1 messages
1 total messages
Started by Paid The Umpire
Fri, 30 Jan 2009 07:36
Using Update SQL with ADO in MS Access
Author: Paid The Umpire
Date: Fri, 30 Jan 2009 07:36
Date: Fri, 30 Jan 2009 07:36
48 lines
2281 bytes
2281 bytes
Hi,
Delphi 7
MS Access 2003
ADO
I have a list StringGrid of scores, which are ordered highest to
lowest. With no two names sharing the same score.
StringGrid
NAME SCORE
Bill 29
John 26
Fred 12
What I'm trying to do is to update my Access database so I can change
the ranking of the people.
Database
NAME AGE RANK
Bill 42 2
John 40 3
Fred 27 1
What I'm trying to do is use a For-Do loop to get each line of the
StringGrid and update the database with the new persons rank.
Code
For a := 1 to 3 do
begin
With PlayerUpdate do begin
Open;
SQL.Clear;
SQL.Text := 'Update Player Set Ranking = ' + IntToStr(a) + '
Where PlayerName = ' + QuotedStr(StringGrid.Cells[0,a]) + ' ;';
ExecSQL;
Post;
Close;
end;
end;
This code comes with the error.
Error Message
"Current provider does not support returning multiple recordsets from
a single execution."
Any ideas for a work around?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads