Hi Mike,
The Fetch command doesn't actualle select the records; it only sets the "cursor"
Try this:
Include "MapBasic.def"
Dim nRowId As Integer,
aRowID As Alias,
stable2 As String
'..... code for setting stable2 = <some tablename>
aRowID = stable2
Fetch first from stable2
Do Until EOT(stable2)
nRowId = aRowID
Select * From stable2 Where ROWID = nRowID Into TO__SELECTION
Objects Clean From selection Overlap Gap 5 Units "sq mi"
'**Close the queries
Close Table TO__SELECTION
Fetch Next from stable2
loop
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
-----Original Message-----
From: Cummings, Mike [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 8:11 PM
To: Mapinfo-L
Subject: MI-L Fetch and selection help
I'm trying to clean a Grid of Townships & Ranges. When I try to clean the whole
table, I end up worse off. I have experimented doing one grid @ a time and that seems
to work, so I wrote some code. I get two error
messages: "selection cannot be accessed as a table" and "Table selection is not open".
How do I get from fetch to "selecting" the fetched record? The Mapbasic help says
you can use a selection table. What am I missing?
Fetch first from stable2
do while not EOT(stable2)
Objects Clean From selection Overlap Gap 5 Units "sq mi"
loop
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11259
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11266