Connection String for dynamic OLE DB Destination in SSDT/SSIS for SQLServer2014

I am new to SQL Server, but not SQL or programming in general. I have been reading the online documentation and tutorials available to set up a For each loop within SSDT/SSIS that loops through a series of flat files in a folder and creates a DB object for each with the same name.

The loop works, except setting up the Connection String for OLE DB Destination Manager. My Server is called 'OLEGS_LAPTOP' with a database called 'Football Data' and I am using the following Connection String:

"Provider=SQLNCLI11.0;Server=OLEGS_LAPTOP;Source=(local);Initial Catalog="+ @[User::FileFound] + "Football Data"+";Integrated Security=SSPI;Auto Translate=False;"

Here, @[User::FileFound] represents the variable set up in the Flat File Connection Manager for looping through the files in my chosen local folder. When I try using this Connection String for the OLE DB object, I get the following error:

TITLE: Package Validation Error
------------------------------

Package Validation Error

------------------------------
ADDITIONAL INFORMATION:

Error at Data Flow Task [OLE DB Destination [10]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Unspecified error".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The metadata could not be determined because every code path results in an error; see previous errors for some of these.".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Invalid object name 'dbo.OLE DB Destination'.".

Error at Data Flow Task [OLE DB Destination [10]]: Failed to open a fastload rowset for "[dbo].[OLE DB Destination]". Check that the object exists in the database.

Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN".

Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.

Error at Data Flow Task: There were errors during task validation.

 (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
BUTTONS:

OK
------------------------------

Can anyone tell me what I need to change in my string to get the desired result?

Thanks

Further to answers/support given so far:

The error message I am now receiving is:

TITLE: Package Validation Error
------------------------------

Package Validation Error

------------------------------
ADDITIONAL INFORMATION:

Error at Data Flow Task [OLE DB Destination [10]]: A destination table name has not been provided.

Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN".

Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.

Error at Data Flow Task: There were errors during task validation.

 (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
BUTTONS:

OK
------------------------------

Answers


It looks like somehow the string "OLE DB Destination" got into table\view mapping (first screenshot) and [dbo].[OLE DB Destination] came out as a table name. Perhaps you've replaced table name with this string in the OpenRowset property of the OLE DB Destination properties window (second screenshot).


LATER EDIT

In order to be able to get table name from variable (assume that you have such variable with table name assigned to it) you need to change your OLE DB Destination's AccessMode property to OpenRowset From Variable and specify variable name in the OpenRowsetVariable property (see image below)


Need Your Help

Simple lasagne network output is very slow

python performance neural-network theano lasagne

I'm trying to train an extremely simple neural network with Lasagne: one dense layer with one output, without nonlinearity (so it's simply a linear regression). Here's my code:

Call StrFormatByteSize64 function from within C#

c# winapi

how can I call the StrFormatByteSize64 function from the Win API from within C#? I'm trying the following code, but without success: