Select to view content in your preferred language

Recordset.Find method   - Does this work in axf layers?

1330
3
Jump to solution
10-03-2012 11:25 AM
KeithGanzenmuller
Frequent Contributor
I have a point layer in an axf file, I have a reference to the recordset and I am simply trying to use FIND to locate a particular record. The script keeps throwing an "Object doesn't support this method" error.

Is this correct? Does an axf recordset not support Find?

Thanks,
Keith
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ThaiTruong
Deactivated User
Yes, RS.Find doesn't work for AXF Feature Layers

View solution in original post

0 Kudos
3 Replies
ThaiTruong
Deactivated User
Yes, RS.Find doesn't work for AXF Feature Layers
0 Kudos
KeithGanzenmuller
Frequent Contributor
Thanks. I could not find that written anywhere in the help system and there is no differentiation in the OMD for axf and non-axf feature layers. Very frustrating.
0 Kudos
ThaiTruong
Deactivated User
Here is a workaround for you.  I used Riverside.axf\Parcel from ArcPad Samples for this sample code.
The message box shows the address of APN = 225112008

Set objLayer = Application.Map.Layers("Parcel") 
Dim pDS
Set pDS = Application.Map.Layers("Parcel").DataSource
Dim pRS
Set pRS = pDS.Execute("SELECT * FROM PARCEL WHERE APN = 225112008")
If (pRS is Nothing) Then
 MsgBox("No Record Found!")
 Exit Sub
End If
pRS.MoveFirst
Do While Not pRS.EOF
 msgBox(pRS.Fields(3).Name & ": " & pRS.Fields(3).Value & vbnewline & pRS.Fields(5).Name & ": " & pRS.Fields(5).Value)
 pRS.MoveNext
Loop
0 Kudos