Jump to content
Software FX Community

Array using getrows method ado

User (Legacy)

Recommended Posts

Right now I use this:

set rs = con.execute("select * from tablex")

Chart1.DataType(0) = CDT_VALUE

Chart1.DataType(1) = CDT_LABEL

Chart1.AdoResultset rs

It works this way.

But what if I want to do it using array with the getrows method.

I found a post that CfxArray will not accept arrays that have been filled

with the GetRows ADO command.

I have the following function called xyz that gets the info using getrows

method ado.

xyz = rs.GetRows

This doesn't work.

Chart1.DataType(0) = CDT_VALUE

Chart1.DataType(1) = CDT_LABEL

Chart1.AdoResultset xyz

Is there a way to do it with the getrows method or no?


Link to comment
Share on other sites

This is what GetRows does (according to MSDN):

"Use the GetRows method to copy records from a Recordset into a

two-dimensional array. The first subscript identifies the field and the

second identifies the record number. The array variable is automatically

dimensioned to the correct size when the GetRows method returns the data."

The method AdoResultset expects an ADO ResultSet, not a two-dimensional


The GetExternalData method may be what you are looking for, you can use this

method to extract data from a myriad of sources including two-dimensional


There is a topic in the Programmer's guide titled "Reading Data from Arrays"

that explains how to do this.



Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...