I'm attempting to develop a simple Visual Studio 2010 SharePoint project which populates a SharePoint list from a single DB2 database table. Very basic. But it fails when I deploy the solution and attempt to view the list. And I looks to be failing regarding the connection string, but it may be failing in how I need to create the database connection; and how it should be done in this case I am unsure.
I do believe all my DB2 drivers and data providers are configured correctly. In VS I can connect to DB2 and build the Business Data Connectivity Model without a problem and see all the DB2 tables.
I think problem is that the DB2 connection string is stored in the app.config of the project. But I think, by design, the app.config is not part of the deployment to SP.
So, I am stuck trying to simply create the connection for the model to use once deployed to SP.
Perhaps my issue is with the connection string but I'm not really sure.
Any suggestions how I should be creating such a connection?
My cleansed app.config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<add name="AgencyEntities" connectionString="metadata=res://*/AgencyModel.Agency.csdl|res://*/AgencyModel.Agency.ssdl|res://*/AgencyModel.Agency.msl;provider=IBM.Data.DB2;provider connection string="Database=DEV;User ID=user1;Password=12345;Server=dbserver:50000;Persist Security Info=True"" providerName="System.Data.EntityClient" />
(note: I have searched and searched for any example as to how I should perform the DB2 connection for an Entity when being used in an SP project. I've found none so far.)