hello,

you have to set up an alias when the table name is a string variable

    DIM alObj as Alias
    DIM aObj as Object
    DIM alCol1Data as Alias
    Dim sData as String  ' <<< change type for actual COL #1

    fetch rec i from tablename
    alObj=TableName+".obj"    ' <<<<< alias
    aObj=alObj
    startX = centroidX(aObj)
    startY = centroidY(aObj)

    alCol1Data=TableName+".COL1"
    sData=alCol1Data
    print sData

WARNING:
    You may also be *fetching* a deleted record [invalid] by using Fetch Rec
# From Table
    It was not in you example but the variable *i* should be initialized
from Fetch Next From Table
        to ensure that the row is valid

Trey Pattillo
Operations & GIS
Coastal Bend 911 Network
2910 Leopard St
Corpus Christi, TX 78408
ph: 1.361.881.9911 ext. 227
pg: 1.361.270.3908 [enter ph#]
fx: 1.361.883.5749
em: [EMAIL PROTECTED]



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to