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 33 34 35
|
Var
ClefObjet, Temp : String ;
Stemplet_Value, Variant_Value, AlbumNavn_Value: String;
begin
ClefObjet := 'AN' + CmbBx_Album_Navn.Text + 'AN' + CmbBx_Album_Nummer.Text + 'S' + CmbBx_Side.Text + 'L' + CmbBx_Linie.Text + 'P' + CmbBx_Placering.Text ;
if ChckBx_Stemplet.Checked = True Then Stemplet_Value := 'is True' else Stemplet_Value := 'is False';
if ChckBx_Varianter.Checked = True Then Variant_Value := 'is True' else Variant_Value:= 'is False';
if CmbBx_Album_Navn.Text <> '' Then AlbumNavn_Value := CmbBx_Album_Navn.Text else AlbumNavn_Value := 'is null';
With AdoCommand1 do
begin
Temp:= 'INSERT INTO objekt3_1 (ObjektNogle, ' + KatalogetInit + 'Nogle , AlbumNavn, AlbumNummer,';
Temp:= Temp + ' Side, Linie, Placering, Antal, Stemplet, Varianter, Samling, Object)';
Temp:= Temp + 'VALUES (' + ClefObjet + ', ' + dt_Kat_Nogle.Text + ', ' + AlbumNavn_Value;
Temp:= Temp + ', ' + CmbBx_Album_Nummer.Text + ', ' + CmbBx_Side.Text + ', ';
Temp:= Temp + CmbBx_Linie.Text + ', ' + CmbBx_Placering.Text+ ', ' + CmbBx_Antal.Text;
Temp:= Temp + ', ' + Stemplet_Value + ', ' + Variant_Value;
Temp:= Temp + ', ' + CmbBx_Samling.Text;
Temp:= Temp + ', ' + CmbBx_Objekt.Text +');';
prepared := False;
commandText := Temp;
ParamCheck := True;
With Parameters do
begin
ParamByName('ObjektNogle').Value := ClefObjet;
ParamByName(KatalogetInit + 'Nogle').Value := dt_Kat_Nogle.Text;
ParamByName(AlbumNavn).Value := AlbumNavn_Value;
...
ParamByName(Varianter).Value := Variant_Value;
...
end;
prepared := True;
Execute; // Pour exécuter la requête
end; |
Partager