TW_WebMap

opening a .csv table in VB.NET crashes ArcMap

Discussion created by TW_WebMap on Jun 6, 2011
Latest reply on Jun 9, 2011 by TW_WebMap
Hi, this code works fine for opening a .dbf, but ArcMap will crash if pTableName is a .csv file.  I can't figure out what to do. Thanks for any help!

        Dim workspaceFactory As ESRI.ArcGIS.Geodatabase.IWorkspaceFactory = New ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass
        Dim workspace As ESRI.ArcGIS.Geodatabase.IWorkspace = workspaceFactory.OpenFromFile(pPath, 0)
        Dim featureWorkspace As ESRI.ArcGIS.Geodatabase.IFeatureWorkspace = CType(workspace, ESRI.ArcGIS.Geodatabase.IFeatureWorkspace) ' Explict Cast
        Return featureWorkspace.OpenTable(pTableName)  'crashes here if table is a .csv

Outcomes