Hi,
I am trying to export a selection out of a large file geodatabase table (over 7 million records - 4.1gb). The selection is only about 25 records or so. When I do this, via the code below, I get an automation error. I have used this code with smaller datasets and it works fine. I tried a very small extract of the dataset I am working with, to determine if this is more of a schema problem, and the export worked without a problem. Is there a size limit on the data these exports are referencing, or are there any other reasons why this may be happening? Thank you for your help!
Regards,
Jared Kaplan
Private Sub FilInteraction(Voltage As String, Query As String)
'On Error GoTo ErrHnd:
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pTableCol As IStandaloneTableCollection
Dim pSATable As IStandaloneTable
Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
Set pTableCol = pMap
Set pSATable = pTableCol.StandaloneTable(CustomFunctions.FindTable("OBJECT_INFRA_INT"))
'Select records with appropriate circuit number
Dim pTable As ITable
Dim pQF As IQueryFilter
Dim pTableSS As ISelectionSet
Set pTable = pSATable.Table
Set pQF = New QueryFilter
'Only filter voltage if no cicuit is given
pQF.WhereClause = Query
Set pTableSS = pTable.Select(pQF, esriSelectionTypeIDSet, esriSelectionOptionNormal, Nothing)
'Create new table and workspace
'Define input table
Dim pTableName As ITableName
Dim pDataset As IDataset
Set pDataset = pTable
'MsgBox (pDataset.Name)
Set pTableName = pDataset.FullName
Dim pInDsName As IDatasetName
Set pInDsName = pTableName
Dim pOutTableName As ITableName
Set pOutTableName = New TableName
Dim pOutDataName As IDatasetName
Set pOutDataName = pOutTableName
pOutDataName.Name = "temp_int"
Dim pWorkspaceName As IWorkspaceName
Set pWorkspaceName = New WorkspaceName
pWorkspaceName.PathName = "c:\"
pWorkspaceName.WorkspaceFactoryProgID = "esriCore.shapefileworkspacefactory.1"
Set pOutDataName.WorkspaceName = pWorkspaceName
'Export Data
Dim pExportOp As IExportOperation
Set pExportOp = New ExportOperation
pExportOp.ExportTable pInDsName, Nothing, pTableSS, pOutDataName, 0
'Ask user if they want to continue if there are more than 10000 possible returns
ErrorKey = CustomFunctions.SelContinue(pTableSS.Count)
Exit Sub
'ErrHnd:
'MsgBox "Error " & Err.Number & ": " & Err.Description
'ErrorKey = True
End Sub