Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of APPEND GENERAL DATA in VB ?
Message
 
À
08/08/2001 10:21:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00541102
Message ID:
00541725
Vues:
27
>But will this change only the data series or the whole field contents?
>
>Seems to me that this code will replace the field contents with whatever is in strData, and that is not what is being pursued. But maybe I missed something?

Yes, and no (about missed).
I've decided (don't know why?), that VFP OLE bound control will be replaced by MS Chart control, which can be bound to ADO data source. In that case table stores only data series. I've just tested it and it works with one difference. Instead of one field data should be stored in a number of records, one per X-value in graph. First field in record is caption and the rest - points. And code will look like:
With Adodc1.Recordset
    .MoveFirst
    .Update "x_caption", "Jan"
    .Update "data1", 29
    .MoveNext
    .Update "x_caption", "Feb"
    .Update "data1", 25
End With
In case of OLE container control my VB says me that MS Graph can't be bound to ADO data control and DAO data control should be used instead. In that case data can be sent to MS Graph by next way:
OLE1.CreateEmbed "", "MSGRAPH"
OLE1.DoVerb -3
OLE1.Format = "CF_TEXT"
OLE1.DataText = "SERIES1" & Chr(9) & "SERIES2" & Chr(13) & _
    "Jan" & Chr(9) & "25" & Chr(13) & _
    "Feb" & Chr(9) & "29" & Chr(13)
More detailed it's explained in "DataText Property Example" (VB Reference).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform