How to reference JSON.NET in SSIS - ssis

I need to parse some JSON in an SSIS package. JSON.NET seems popular and well supported. I downloaded the latest version, but...
My development machine already has 97 different copies of Newtonsoft.Json.dll in various places. The target deployment server has over 120. Installing yet another one isn't going to help matters.
I'm using VS 15.9 for development. I read that JSON.NET is already built-in to VS here, but I sure can't find it anywhere in "Add reference". using in C# doesn't seem to bring up anything.
How do I get started?
How will the reference translate when I deploy? Do the .DLL paths need to be the same on dev machine/server, or can it work off some kind of signature?
EDIT:
I've got started, and it works beautifully. I referenced this file:
C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Extensions\Common\Newtonsoft.Json.dll.
It exists on both my target servers. But is this best practice? I have no idea on how best to reference DLLs from SSIS.

Related

Delphi can't connect to MySql, claims libmysql.dll isn't in the path when it is

Before anyone marks this a duplicate, please read to the end, as none of the many similar questions helped.
I've just installed Delphi Community Edition and MySql (recommended download from this link) on Windows 11, but am having trouble connecting Delphi to MySql.
I used MySql Workbench to create a new connection, and created a new database with a table and some sample data.
If I start Delphi and create a new Windows VCL project, then choose Tools -> FireDAC Explorer, then try to expand the connection, I get an error "Cannot load vendor library [libmysql.dll, libmariadb or libmysqld.sll]"
I'm assuming that only libmysql.dll is relevant to me, as I don't use Maria, and don't have the other DLL anywhere on my system. I used sigcheck to check that I indeed have a 64-bit version of the DLL.
I have the same error if I use the Data Explorer in Delphi itself.
I read a lot of questions here about this exact error, but all of the ones I've seen suggest one of two things, neither of which apply here...
Add the DLL's location to the PATH environment variable - I have libmysql.dll in the C:\Program Files\MySQL\MySQL Server 8.0\lib folder, and have added that to my PATH environment variable, but it didn't help. I restarted Delphi, but no joy. I even added a TEdit to my form in Delphi, with the following code...
Edit1.Text := GetEnvironmentVariable('PATH');
This confirmed that I had set the environment variable correctly.
Copy the DLL to the project's bin folder. I tried this as well, and it didn't make any difference. However, as I haven't got as far as trying to connect my code to MySql, I didn't expect this to help. I can't even get Delphi itself to connect.
Anyone any ideas? I know there are a lot of questions about this error, but none of them worked for me.
Thanks
Please check the rest of the error message. Sometimes it specifies the bitness of the DLL you need. It's easy to miss that bit and get the wrong version.
I think MySql comes with a 64-bit DLL, but for some reason I never worked out, Delphi seems to need a 32-bit version. I had to search around and download one from a 3rd-party site, which I don't like, but it did work.

DLL build with OCI and MySQL and LabView keeps failing

NOTE: I've been successfully building these DLLs that can be executed by LabView for over 15 years now (and Excel too, recently). As a matter of fact, LabView can view all the entry points into the DLL, it just can't execute them.
Having taken out MySQL and Oracle/OCI functionality, LabView can now execute my code properly. It appears the culprits are in, libmysql.lib and oci.lib
I guess the easy way to replace the MySQL library is with MariaDB. Any suggestions for OCI?
Turns out the linking and build were fine. With the instantclient installation Oracle doesn't make any changes to the registry so that the OS can find OCI.DLL. When I used LabView to load OCI.DLL from the instantclient directory, those functions loaded fine, so I then placed OCI.DLL in the same directory as my LabView source and everything worked as it should.
The MySQL issue was resolved with linking to mysqlclient.lib instead of libmysql.lib
I think it's important to note that Oracle provided no help or support.

How to use MySQL in a C# / XAML project

I've been searching around the web trying to find out how to use MySQL in a XAML project.
I've seen a bunch of examples where functions like MySqlConnection(...) are used and so forth, but none of them mentions if a specific assembly is necessary or if it's something you need to download first - like a dll.
Something like that is needed since it doesn't work straight away.
Anyone knows that?
You have to download and install MySql .Net Connector. Tool provided by MySql to connect with .net. This will have the assemblies used to connect .Net Applications to MySql.

SSIS - Reference DLL Dynamic Directory

I'm trying to create some Crystal Reports via SSIS which works wonderfully when it can find the DLLs, but not so much when it can't.
I've gone into the package to add the references, but the problem is when the package is running from SQL Agent it can't find the references since they aren't in that drive path.
Is it possible to put the DLL files in separate locations that can be accessed independently and have the path to the DLLs be stored in a variable and then referenced either programmatically or have the path defined dynamically?
Thanks
All DLL references used in SSIS need to be registered with the GAC.
You have a couple of different options to do that, check out my previous answer for the how: How do I use COM reference within SSIS package?
You could try copying the DLLs to the SQL Server binary folder (in my case "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\binn").
I had this problem calling a .Net library that uses HtmlUnit. The NuGet version I'm using doesn't have a Strong Name, and so can't be GACed, but that worked for me.

dll files for creating a setup

I 'm working on an application using rad studio 2009 (c++) and mySQL. I want to build a setup so I can set up my application and on other PCs without installing and rad studio. As far as I 've searched, I will need some dlls. Does anyone know what dlls? I couldn't find out...
please help!
For C++ Builder if you don't use runtime packages and you link against the static RTL then you don't need to supply anything beyond the compiled .exe.
I couldn't say what you need for the database connection, but I imagine it is documented and Johan has provided you with an answer that addresses this part of your question.
Dependency Walker can be used to investigate the dependencies.
You need libmySQL.dll
and if you're using dbExpress you'll also need: dbxmys.dll
If you're using ZEOS you'll only need the libMySQL.dll, but AFAIK only ZEOS 7 alpha works in Unicode Delphi/C++ Builder
Be careful to make sure libMySQL.dll is is the exact version that goes with the MySQL server you are connecting against.