Home

IBM.Data.DB2.Core Nuget Package

edited January 2023

Does anyone know if the paid version of LINQPad 7 plays nice with the IBM.Data.DB2.Core Nuget package? I tried adding manual references to the DLLs on the free version to test (copying them over from a working .NET project), but I get the below error when trying to open a DB2Connection.

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, Error Message: Could not detect 'db2app64.dll' at following location: 'C:\Users\myuser\AppData\Local\Temp\LINQPad7_wzkeskpo\shadow-1\clidriver\bin\db2app64.dll'

In my actual .NET project, the db2app64.dll is indeed in a clidriver\bin\ subfolder, which is what I think might be tripping LINQPad up? If it works in the paid version via Nugget that’d be great, as I was already considering upgrading, but I was hesitant to buy if it might not work for my database driver.

Comments

  • edited January 2023

    You can add a NuGet reference in the free edition of LINQPad by editing the .linq file directly:

    <Query Kind="Statements">
      <NuGetReference>IBM.Data.DB2.Core</NuGetReference>
    </Query>
    

    When you next open the query, LINQPad will ask if you wish to restore NuGet packages - answer yes, and you should be able to test it. If this works, you can create a new query with the same NuGet references with Ctrl+Shift+N (or clone it with Ctrl+Shift+C).

  • @JoeAlbahari said:
    You can add a NuGet reference in the free edition of LINQPad by editing the .linq file directly:

    <Query Kind="Statements">
      <NuGetReference>IBM.Data.DB2.Core</NuGetReference>
    </Query>
    

    When you next open the query, LINQPad will ask if you wish to restore NuGet packages - answer yes, and you should be able to test it. If this works, you can create a new query with the same NuGet references with Ctrl+Shift+N (or clone it with Ctrl+Shift+C).

    Thank you for the great tip! I just tried this, and I got results back from my query this time. If anyone else is using the NuGet package for the IBM Data Server provider for .NET Core and on the fence about upgrading, rest assured that it will work with LINQPad!! (I cannot confirm on the license piece, however, since I’m using it for Informix rather than DB2, and a license is not required when connecting to an Informix database.)

    Thank you for making such an amazing product. Even the free version has been a godsend. I can’t wait to be able to upgrade to the Premium version. Hopefully my employer will pay for it since I use LINQPad specifically for business, but if not, it’ll be worth buying even for myself!!

Sign In or Register to comment.