1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Var
Qry:TQuery;
Begin
Qry:= TQuery.Create(nil);
Qry.SessionName:='Default'; //ou si tu as un composant session Session1.SessionName;
Qry.DatabaseName:='alias',
Qry.SQL.Clear;
Qry.SQL.Add('Insert Into ARTICLE (CodeArticle,Designation,Pu,Annee) VALUES (:Code_article,:Libelle,:Prix,:Annee)');
Qry.ParamByName('Code_article').AsInteger:=Code_article;
Qry.ParamByName('Libelle').AsString:=Libelle;
Qry.ParamByName('Prix').AsCurrency:=Prix;
Qry.ParamByName('Annee').AsInteger:=Annee;
Qry.ExecSQL;
Qry.Free;
End; |