For Count := 1 to StrToInt(NumofAppsPerTeach[1, 2]) do
begin
NumofSlots := NumofSlots + 1;
ADOQuery1.SQL.Clear;
[b] ADOQuery1.SQL.Add('ALTER TABLE Timetable');
ADOQuery1.SQL.Add('ADD COLUMN TimeSlot' + IntToStr(NumofSlots) + ' Integer;');
ADOQuery1.ExecSQL; [/b]
end
Normally I wouldn't ask for help with SQL related topics, but the strange thing with this error is that this piece of code has run perfectly dozens of times before but yet it is giving me an error now.
Is there anything wrong with my SQL?
Here is a screenshot of what the query looks like at run time:

Thanks in advance for any help.


Sign In
Create Account


Back to top










