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?

thanks

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

array.

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

arrays.

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

that explains how to do this.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...