Bonjour,

Voila ce que je recherche.

Dans un champ d'une table acces (champ Objet OLE) j'écris sans problème cela :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
      qgps.SQL.Add('INSERT into ValeurGps(Genre,Espece,Type_dessin,indice,LatitudeNE,LongitudeNE, ');
      qgps.SQL.Add(' LatitudeSW,LongitudeSW,Radius,Clickable ');
      qgps.SQL.Add(' ,Editable,FillColor) ');
      qgps.SQL.Add(' VALUES ( ');
      qgps.SQL.Add(' ''Genre'',''Espece'',''Cercle'', ');
      qgps.SQL.Add(' '+inttostr(i)+', ');
      qgps.SQL.Add(' '+floattostrf(GMCircle1.Items[i].Center.lat,Fffixed,10,7)+', ');
      qgps.SQL.Add(' '+floattostrf(GMCircle1.Items[i].Center.lng,Fffixed,10,7)+', ');
      qgps.SQL.Add(' '+floattostrf(0.00,Fffixed,10,1)+','+floattostrf(0.00,Fffixed,10,1)+', ');
      qgps.SQL.Add(' '+floattostrf(GMCircle1.Items[i].Radius,Fffixed,10,0)+',True, ');
      if GMCircle1.Items[a].Editable then
       qgps.SQL.Add(' True, ')
        else
         qgps.SQL.Add(' False, ');
      qgps.SQL.Add(' ''GMCircle1.Items[a].FillColor'' '); // Champ Objet OLE
      qgps.SQL.Add(' ) ');
L'écriture de GMCircle1.Items[a].FillColor' se passe bien mais mon problème c'est comment, lorsque
je lis mon enregistrement , je recharge dans GMCircle1.Items[a].FillColor' la variable FillColor .

cette ligne : GMCircle1.Items[a].FillColor:=qgps.fieldbyname('FillColor').AsVariant; fait une erreur à
l'ouverture du programme :
message 'argument incorrect'
Merci de vos réponses.
A+