Solved

DataGrid data to an array

Posted on 2000-04-20
5
164 Views
Last Modified: 2010-05-02
I use an ACCESS database recordset to store columns of numbers that I would like to plot on an x-y chart in a VB program. I can pull the data easily into my VB program using DataGrid and display it on the screen.
What I'd like to do with the data is select two columns and put that data into a two dimensional array so I can plot the data on an x-y chart. It seems like there should be an easy way to do this but I'm getting nowhere. Any solutions??
BOB
0
Comment
Question by:rafox
  • 2
  • 2
5 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 2735587
Take a look at the GetRows method (of the ADO object).
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 2735604
Take a look at the GetRows method of the ADO recordset object.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2736012
you might consider creating a udt rather than a two dimensional array, e.g.

Private Type coords
   x As Variant
   y As Variant
End Type
0
 

Author Comment

by:rafox
ID: 2736538
emoreau--
GetRows works -- I was looking for something from DataGrid but as long as I can get the data into the arrays, I'm OK.

BOB



AzraSound--
Is there any advantage to using a udt as you suggested when using the data in an XY plot using MSChart Control. How would I use it?

BOB
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2736626
no not really other than the fact you dont have to work with two dimensional arrays.  If that isnt a bother to you then there really is no need to go with the udt's.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now