Forum


HomeHomePremiumPremiumDevelopmentDevelopmentIBM DB2 Module Development dll IssueIBM DB2 Module Development dll Issue
Previous
 
Next
New Post
10/7/2015 5:37 AM
 

Hello,

I've run into a problem. I'm tasked with connecting to a DB2 database. However the issue is my project pulls the IBM.Data.DB2.dll into the root sites bin folder. This causes any site the module is installed on to crash. Through many fruitless hours of research I've gleaned that this dll has an unknown number of dependencies of its own to be able to function. On top of that it appears it wasn't designed to be a stand alone dll. Even better I hear that to use it you need a full installation of IBM on the server for it to function. I've tried a number of things to get a connection to work as a module: I built a standalone c# class project that references IBM.Data.DB2.dll with some test functions but when I reference it from a module it still pulls the unwanted dll into my root sites bin folder causing it to crash. I also tried building a class project as an api that references my helper class project but again once I add it to the site it pulls that unwanted dll. I'm unsure how to go about working with db2 with dnn. I've seen at least one module that claims it is compatible but there's literally no information on how to get this to work. Hopefully I'm just missing something or am going about it the wrong way but it appears dnn in incompatible with IMB DB2 at least in the way I'm going about it.

Is there a way I can tell a project to compress everything it needs to run? Somehow make it so it doesn't try to add dll's to the bin folder? My project works as a console application but I think it's depending on my local install of IBM. Is there a work around?

Thanks.

 
New Post
10/7/2015 8:43 AM
 

So,

My problem came down to the fact that no matter what I did that dll keeps getting added to the bin and the site crashes. What it took me a while to test was if anything still worked if I manually deleted it. It did! My assumption was that if it was being added it was needed and would be referenced from the bin. Turns out if it's not there it can figure out where my local install of IBM is and call it from where it's supposed to. Problem now was that every time I do a build it gets re-added and the site takes long enough as it is to reload after a build. What I did was open up the post build events from project>properties>build events and add a line that removes that dll. I tweaked it to function on both my local machine and the production server it will eventually be deployed to like such:

(del "D:\path\bin\IBM.Data.DB2.dll" /F /Q || (call )) && (del "C:\path\bin\IBM.Data.DB2.dll" /F /Q || (call ))

I'm not sure if this will work the same on install but worst case scenario I just manually delete it.

Cheers.

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentIBM DB2 Module Development dll IssueIBM DB2 Module Development dll Issue



Try FREE
30 days money back guaranteed