[BulkInsert] Getting error while using bulk insert for outsystems table (Using physical name)

Forge Component
(20)
Published on 2019-10-02 by Galter
20 votes
Published on 2019-10-02 by Galter

BulkInsert: System.InvalidOperationException: Cannot access destination table 'OSUSR_qy5_TEST'. ---> System.Data.SqlClient.SqlException: Invalid object name 'OSUSR_qy5_TEST'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

Hi Rocky,


Probably you have the table in a diferent SCHEMA (Catalog). Try specify the catalog before the table name.