I am migrating the SQL DMO logic to a SQL SMO logic and I am not sure how to achieve the same functionality for a few of the attributes. This is the DMO:
oBCP = New SQLDMO.BulkCopy2
With oBCP
.ImportRowsPerBatch = ImportRowsPerBatch
.DataFilePath = Path.Combine(gtSysTempDir, "file.dat")
.LogFilePath = Path.Combine(gtSysTempDir, "file.log")
.ErrorFilePath = Path.Combine(gtSysTempDir, "file.err")
.MaximumErrorsBeforeAbort = 1
.DataFileType = SQLDMO.SQLDMO_DATAFILE_TYPE.SQLDMODataFile_TabDelimitedChar
End With
This is the SMO so far:
trans = New Transfer
With trans
.ImportRowsPerBatch = ImportRowsPerBatch
.TargetDatabaseFilePath = Path.Combine(gtSysTempDir, "file.dat")
.TargetLogFilePath = Path.Combine(gtSysTempDir, "file.log")
'.ErrorFilePath = Path.Combine(gtSysTempDir, "file.err")
.MaximumErrorsBeforeAbort = 1
.DataFileType = SQLDMO.SQLDMO_DATAFILE_TYPE.SQLDMODataFile_TabDelimitedChar
End With
What are the equivalents, if they exist, of ImportRowsPerBatch (BatchSize?), ErrorFilePath, MaxErrorsBeforeAbort, and DataFileType? Thanks.