Solved

DataGrid data to an array

Posted on 2000-04-20
5
168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 70

Accepted Solution

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 68
Visual Studio search word table and return Cell index 8 78
fso.FolderExists("\\server\HiddenFolder$") 4 89
Advice in Xamarin 21 109
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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