Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems using Teechart OCX Ver.5
Message
De
06/08/2002 20:34:34
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Problems using Teechart OCX Ver.5
Divers
Thread ID:
00686826
Message ID:
00686826
Vues:
93
I'm evaluating Teechart OCX to develop graphs with VFP.

I'm writing the folowing code:
LOCAL oConn as "adodb.connection"
LOCAL oCmd as "adodb.command"
LOCAL oRs as "adodb.recordset"

oConn = CREATEOBJECT("adodb.connection")
oConn.ConnectionString = 'Provider=VFPOLEDB.1;;
Data Source="C:\Teste\TesteG\Dados\Data1.dbc";Password="";Collating Sequence=MACHINE'
oConn.Open
oRs = CREATEOBJECT("ADODB.Recordset") 
oRs.Open ("Select TOP 10 ORDERS.ORDER_NET FROM orders ORDER BY order_id",oConn)

ThisForm.Olecontrol1.Series(0).Clear
ThisForm.olecontrol1.Series(0).DataSource = oRS	&& Problem in this line
ThisForm.olecontrol1.Series(0).asBar
ThisForm.olecontrol1.Series(0).YValues.ValueSource = oRS.Fields("ORDER_NET").Value 
I get this error message when trying to define the Datasource

OLE IDispatch exception code 0 from ?:
Current Recordset does not support bookmarks. This may be a limitation of the
provider or of the selected cursortype..

But from Teechart Help
Working with ADO Datasources says:
syntax for Series DataSource may be a Recordset or a DSN as a string

or with an externally created Recordset:

      Set Conn = CreateObject("ADODB.Connection")
      Set rst = CreateObject("ADODB.Recordset")
      Conn.Open "DSN=TeeChart Pro Database"
      rst.Open "select * from employee", Conn, 1, 1
      TChart1.Series(1).DataSource = rst
Does someone uses Teechart with VFP and could show how to define a External Recordset using Teechart OCX.

Thanks in advance.

Peter
Répondre
Fil
Voir

Click here to load this message in the networking platform