Select to view content in your preferred language

Recordset ToArray not working...

1449
1
03-29-2011 02:13 AM
SteveFitzgerald
Occasional Contributor
According to the Arcpad Studio help file the Recordset object has a ToArray method.
An example is given using an AXF file.
I have successfully ran the example in a console window without problems.

When I try to use the ToArray method with a dbf file however, it gives me an "object doesn't support this action" error.

For example:
  Dim RS
  Set RS = Application.CreateAppObject("RecordSet")
  RS.Open "C:\Temp\Trees.dbf",1
  Console.print RS.RecordCount  'check recordset is open
  RS.ToArray 'error here

Any ideas anyone?

Steve
Tags (3)
0 Kudos
1 Reply
SteveFitzgerald
Occasional Contributor
It doesn't fix the problem but I should have assigned an array variable to the recordset ToArray method in the example above:

  Dim RS, anArray
  Set RS = Application.CreateAppObject("RecordSet")
  RS.Open "C:\Temp\Trees.dbf",1
  Console.print RS.RecordCount 'check recordset is open
  anArray = RS.ToArray 'error here

Any ideas anyone?
0 Kudos