Missing semicolon ( ; ) at end of SQL statement
Quelqu'un a une idee de comment regler ce probleme ????
j'ai le message d'erreur "Missing semicolon ( ; ) at end of SQL statement"
j'ai besoin d'ajouter plusieur record en 1 transaction, au pire si vous avez un autre exemple qui fonctionne je peux voir si je peux adapter ca a mon code.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
procedure InsertMultipleEntries;
var
Conn : TADOConnection;
AdoQuery : TADOQuery;
begin
Conn := TADOConnection.create(nil);
try
Conn.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Mode=Share Exclusive;Data Source="maBD.mdb"';
Conn.LoginPrompt := false;
Conn.Connected := true;
try
try
AdoQuery := TADOQuery.create(nil);
AdoQuery.Connection := Conn;
AdoQuery.SQL.Text := 'INSERT INTO Personne (Nom, Prenom) VALUES (''Charle'', ''Charet''), ( ''Manon'', ''Plante'');';
AdoQuery.ExecSQL;
except
on E: Exception do
begin
ShowMessage(E.Message);
end;
end;
finally
AdoQuery.Free;
end;
finally
Conn.Free;
end;
end; |