Hi Silke,

I guess your problem is with the name of the column. MapInfo doesn't - as
far as I remember - allow column names with an "-". I quote from the
MapBasic help:
"column  is the name of a column to create. Column names can be up to 31
characters long, and can contain letters, numbers, and the underscore (_)
character. Column names cannot begin with numbers."

The reason for the strange error message is that the compiler tries to
translate the columnname into a calculation with a strange result.

Try this in stead:
1      dim glkw75 as integer
2      select * from lokrel into auswahl
3    fetch first from auswahl
4      do while not eot(auswahl)
...
10        glkw75 = auswahl.g_lkw_75t
...
15        fetch next from auswahl
16      loop

Or if your column name actually has a "-" within, use this syntax:
1      dim glkw75 as integer
1a   Dim aglkw75 As Alias
2      select * from lokrel into auswahl
3    fetch first from auswahl
4      do while not eot(auswahl)
...
10 a     aglkw75 = auswahl.g-lkw-75t     'This line can also be put outside
the loop
10        glkw75 = aglkw75
...
15        fetch next from auswahl
16      loop

The second idea is using the Alias variable which so to say points at a
certain table/colulm combination. This is actually the way of tdoing things
when you are using variables as table and/or column names.

I hope this helps,

Best regards,

Peter
Kampsax, Denmark


                                                                                       
                                        
                    Silke Keuerleber                                                   
                                        
                    <[EMAIL PROTECTED]>            Til:    
"'[EMAIL PROTECTED]'"                         
                    Sendt af:                            
<[EMAIL PROTECTED]>                                   
                    [EMAIL PROTECTED]        cc:                           
                                        
                    onsmag.com                           Vedr.:  MI-L column name not 
accepted                                 
                                                                                       
                                        
                                                                                       
                                        
                    19-04-01 14:36                                                     
                                        
                    Besvar venligst til Silke                                          
                                        
                    Keuerleber                                                         
                                        
                                                                                       
                                        
                                                                                       
                                        
                                                                                       
                                        
                                                                                       
                                        



Dear all,

I have a problem with column names in a Map Basic programm.
Compiling the following lines:

1      dim glkw75 as integer
2      select * from lokrel into auswahl
3    fetch first from auswahl
4      do while not eot(auswahl)
...
10        glkw75 = auswahl.g-lkw-75t
...
15        fetch next from auswahl
16      loop

results in the following error message:

      line 10: unrecognized command: t

If I change line 10 in:

     glkw75 = auswahl.g-lkw-75

everything works fine. The problem is that I have to use fixed column names
and can't remove the t.

Any ideas what I can do?

Thanks for your help.


Silke Keuerleber

PTV AG
Mobility Systems
GIS Data Engineering

Tel.:           +49 7 21 96 51- 465
Fax:       +49 7 21 96 51- 688
E-Mail: [EMAIL PROTECTED]
____________________________

PTV
Planung Transport Verkehr AG
Stumpfstrasse 1
76131 Karlsruhe
Germany
http://www.ptv.de
http://www.reiseplanung.de
http://www.varta-guide.de
http://www.cityguidefinder.de


~~~~~~~~~~~~ List Sponsor ~~~~~~~~~~~~
Digital GEO data for 125 countries
LAND INFO International produces digital geographic data for over 125
countries.   DEMs, satellite imagery, topo maps, vector map layers,
flood maps, and more.   Visit http://www.landinfo.com/indexdm1.htm and let
our specialists find the right solution.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________________________________
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.





~~~~~~~~~~~~ List Sponsor ~~~~~~~~~~~~
Digital GEO data for 125 countries
LAND INFO International produces digital geographic data for over 125
countries.   DEMs, satellite imagery, topo maps, vector map layers,
flood maps, and more.   Visit http://www.landinfo.com/indexdm1.htm and let
our specialists find the right solution.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________________________________
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