You can't stick field names onto string variables. You need to
use an alias variable, like so:
Dim aHold, aRowID as alias
...
aHold = sBaseTable & ".Obj"
aRowID = sBaseTable & ".RowID"
Do Until EOT(sBaseTable)

  'Get Object Information
  oHold = aHold
  iRowID = aRowID

  ...

The contents of hte alias variables are updated on every fetch so
they need be defined only once.

- Bill Thoen


Ian Tidy wrote:
> 
> Hi All
> 
> I have this little piece of code that when it compiles I get "(splitline.mb:80) 
> Unrecognized command: .. " error.
> 
> Dim sNewTable As String
> Dim sBaseTable As String
> Dim iRowID As Integer           'RowID Hold
> Dim oHold As Object                     'Object Hold
> 
> sNewTable = "TMP" & CurDate()
> sBaseTable = SelectionInfo(Sel_Info_TableName)
> Create Table(sNewTable) Using sBaseTable
> 
> Fetch First From sBaseTable
> Do Until EOT(sBaseTable)
> 
>         'Get Object Information
>         oHold = sBaseTable.Obj
>         iRowID = sBaseTable.RowID
> 
>         '.... Other Code
>         Fetch Next From sBaseTable
> Loop
> 
> Please help find the error in this code, I don't understand why it shouldn't work.  
> I am using MapBasic 7 and MapInfo Pro 7.
> 
> TIA
> 
> Cheers Ian

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 6023

Reply via email to