H
hharry
Hello All,
I am running a bulk load from a flat file to sql server, using a
sqlcommand object. I have an issue when the load fails due to a row
being longer than specifed in the format file - the command fails and
exits.
Is it possile to skip errors and continue loading until the eof ?
I have tried setting the maxerrors option but same result.
Source code:
str_sql.Append("BULK INSERT " + MYTABLE + vbCrLf)
str_sql.Append("FROM '" + MYFLATFILE + "'" + vbCrLf)
str_sql.Append("WITH (FORMATFILE = '" + bcpFile + "'," +
vbCrLf + "BATCHSIZE = 1000," + vbCrLf + "MAXERRORS = 1000" + vbCrLf _
+ ")")
Thanks in advance
I am running a bulk load from a flat file to sql server, using a
sqlcommand object. I have an issue when the load fails due to a row
being longer than specifed in the format file - the command fails and
exits.
Is it possile to skip errors and continue loading until the eof ?
I have tried setting the maxerrors option but same result.
Source code:
str_sql.Append("BULK INSERT " + MYTABLE + vbCrLf)
str_sql.Append("FROM '" + MYFLATFILE + "'" + vbCrLf)
str_sql.Append("WITH (FORMATFILE = '" + bcpFile + "'," +
vbCrLf + "BATCHSIZE = 1000," + vbCrLf + "MAXERRORS = 1000" + vbCrLf _
+ ")")
Thanks in advance