Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

cw3dgrph.oxc and access db

I use the cw3dgrph.ocx to plot data in acces application using the following code:

Dim pippo As Recordset
Dim c
    Set pippo = New ADODB.Recordset
    pippo.ActiveConnection = CurrentProject.Connection
    pippo.Open "xyz", , adOpenKeyset, adLockOptimistic, _
        adCmdTable
  
  Const n = 10
 
 Dim x(n), y(n), z(n)
 
     For I = 1 To n
        x(I) = pippo.Fields("x")
        y(I) = pippo.Fields("y")
        z(I) = pippo.Fields("z")
        pippo.MoveNext
     Next
      
'Plot the data on each graph
 
  CWGraph3D1.Plot3DCurve x, y, z
  
  
   pippo.Close
 
I would know how to update or bypass "const" value when  number of data source records increases
 
Thanks
 
Benedetto
 
 
0 Kudos
Message 1 of 2
(6,319 Views)
 
 

Hello Beta66,

 

Const values are not intended to be changed; you would need to set n at the time of declaration (in the line Const n = 10). For more information about this, I would recommend that you post this question on a Visual Basic forum rather than Measurement Studio as this question does not inquire about the Measurement Studio libraries, but rather the Visual Basic programming language.

 

Regards,

 
Jordan Randall
National Instruments Italy
0 Kudos
Message 2 of 2
(6,297 Views)