Mariano,
 
I wonder if you're getting the error because your using a stand-alone fields object - perhaps you have to use the fields collection of an extant dataset.
 
Richard Burkmar
Swift LG
-----Original Message-----
From: MAGS (Mapping Global Solutions) [mailto:[EMAIL PROTECTED]]
Sent: 08 November 2000 16:05
To: MapInfo-L
Cc: MapX (Foro de Discusion)
Subject: MI-L MapX error creating a new table

Hi all !
I'm working with VB 5.0 and MapX 4.5.
When I try to generate a new Mapinfo Table on disk I have found an error:  "Automatization Error"
 
The code we have is:
 
Private Function fgenera_layer_online() As Boolean
 
        Dim lli_layerinfo    As New MapXLib.LayerInfo
        Dim lcampos        As New Fields
        Dim lyr                 As MapXLib.Layer
                
        On Error GoTo fgenera_layer_online_error
       
        fgenera_layer_online = False
                
        lcampos.Add "vehiculo", "vehiculo", miAggregationIndividual, miTypeNumeric
                
        lli_layerinfo.Type = miLayerInfoTypeNewTable
        lli_layerinfo.AddParameter "Filespec", App.Path + "RECORRIDOS_ONLINE.TAB"
        lli_layerinfo.AddParameter "Fields", lcampos
    
        Set lyr = Map1.Layers.Add(lli_layerinfo)
 
        fgenera_layer_online = True
    
        Exit Function
       fgenera_layer_online_error:
           MsgBox "Error: " + Err.Description
           Exit Function
End Function
 
I will appreciate a lot any help !
Regards
Mariano

Reply via email to