Hello group,
CodeBase 6.5
VB.NET 2003
PocketPC application
I am relatively new to CodeBase and am trying to get a sorted set of
records from a table and add them to a listview (which I have done
successfully with just a table and seeking). I have reviewed the
documentation and performed a few searches on the this newsgroup and
have put together the following code (this is just the code that should
loop through the relation and populate the listview)
MasterRelation = relate4init(dbFacilities)
rc = relate4querySet(MasterRelation, "IMID = '" & strIMID &
"'")
rc = relate4sortSet(MasterRelation, "BIF->FACILITY")
ptrFacility = d4field(dbFacilities, "Facility")
ptrFID = d4field(dbFacilities, "Fid")
rc = relate4top(MasterRelation)
Do Until rc <> r4success
Dim item As New ListViewItem(f4str(ptrFacility))
item.SubItems.Add(Trim(f4str(ptrFID)))
lvFacilities.Items.Add(item)
rc = relate4skip(MasterRelation, 1)
Loop
When I run the function with this code, I get a Native Exception error
when rc = relate4skip(MasterRelation, 1) is run. I debugged the code
and do not get errors with the relat4QuerySet or relat4sortSet calls.
I am only using one table in my relation since I only want to sort.
Any ideas why the Relate4skip call throws an error?
Sean M. Severson


|