Connection to AS400 ( DB2 iseries) using Xamarin and Visual Studio 2015 - xamarin

I'm working on an android Application using Xamarin and Visual Studio 2015. Our data is in AS400 systems. I'm trying to connect to the AS400 via DB2 using the iSeries. I'm referencing the IBM.Data.DB2.iSeries.dll as I use this dll for my other web applications that work fine with DB2. I get the following error as soon as I try to create a new connection object: The type initializer for "IBM.Data.DB2.iSeries.iDB2tracing" threw an exception. When I check the android device monitor is like it can't access any of the classes from the IBM.Data.DB2.iSeries.dll. Is unable to use this dll. Are there some kid of permissions that I am missing? I'm also doing no linking so it includes all my dlls.
Thank you!

AS/400 and iSeries are both names for an old IBM midrange system that is now called IBM i on Power. IBM i is the operating system, Power Systems is the hardware. The specific dialect of DB2 that runs under IBM i is DB2 for i. IBM.Data.DB2.iSeries.dll is the DB2 for i .NET provider for Windows. If you want to access DB2 for i from Android, the best thing might be a JDBC driver. You can get that at http://jt400.sourceforge.net/

Related

Add providers to VS 2008 Connection Manager?

With Visual Studio 2008 I'm trying to connect to an Oracle database using Oracle Provider to OLE DB (the only Oracle driver available in dropdown), and I'm having issues with it. So I'm trying to add other drivers to that VS2008 "Connection Manager" dropdown. Unfortunately, I only see the ones in this screenshot
How can I add other drivers to this dropdown? When I create an ODBC driver, I see several other Oracle drivers to choose from that I don't see in the VS2008 dropdown.
You installed more than one Oracle Client, this is always a bad idea. Usually there is no reason to install more than one Oracle Client, i.e. one each for 32-bit and 64-bit.
For OLE DB you cannot install more than one driver (per architecture), see Installation Considerations for Oracle Database Client:
You can install all Oracle components in multiple Oracle homes on the
same computer. However, some components can only support one active
instance at a time. This means that the current (latest) installation
renders the previous one inactive. These components are:
Oracle Administration Assistant for Windows
Oracle Provider for OLE DB
This is a limitation in COM. So, you cannot add other providers, at least no other Oracle Provider for OLE DB
You could use the Microsoft OLE DB Provider for Oracle (MSDAORA), however this has been deprecated for ages and it is really not recommended to use it.
Instead of OLE DB you could also use ODBC or use the Oracle Data Provider for .NET, you can download and install it from here: 32-bit Oracle Data Access Components (ODAC)
As far as I know Visual Studio 2008 supports only .NET Framework only up to version 3.5, thus you would have to use the Oracle Data Provider for .NET 2.0, version 4 will not work.
Maybe this list provides an overview for you: How to connect to Oracle 11 database from . net
If you like to get a list of all OLE DB providers which are installed on your machine, check this one: How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider

How do I do an ODBC connection to ORACLE from SSIS/ Visual studio?

Despite that OLE DB and ADO.NET are newer than ODBC potentially, I've heard that ODBC connections to Oracle are potentially faster within SSIS.
I'm trying to set up a simple ODBC connection to an Oracle DB in SSIS
The OLE DB / ADO.Net connections were easy. I entered the credentials and boom, connected.
ODBC proves very difficult. I'm running Windows 10 64 bit. Visual Studio 2015 (I believe the designer for SSIS was only meant to initially play with 32-bit ODBC connections). Oracle is version 12c.
So ... I did the convoluted Oracle driver install. Downloaded Oracle basic light express + ODBC. Put them in the same directory. Ran odbc.install.exe WITH admin privileges. Finally got the Oracle driver to show up in Microsoft ODBC (32 or 64, ended up downloading both eventually). I test the connection in Microsoft ODBC setup? Success!! NOOOOW. .. enter Visual studio. Set up connection --- test --- FAIL! Some cryptic error .... 127 ... the "oracle" in quora32.dll can't be found.
Are Microsoft Drivers for Oracle still available for download?
32-bit vs 64-bit
I think that the main cause of the problem is that Visual studio is a 32-bit application and the ODBC driver installed is 64-bit. On the other hand the operating system is 64-bit then it will work normally. Check the following links for more information:
ODBC Connection not appearing SSIS
Set up the ODBC Driver for SSIS
Attunity connectors
I really didn't tried connecting to Oracle using ODBC, but if your goal is to achieve higher performance then the fastest way to connect to Oracle from SSIS is using Attunity high speed connectors for Oracle that have been selected by Microsoft to be included with SQL Server Integration Services (SSIS).
Check the following links for more information:
Microsoft Connectors for Oracle and Teradata by Attunity for Integration Services (SSIS)
Microsoft Connectors by Attunity
Oracle provider for Oledb missing in VS 2015 Shell
SSIS not running in parallel with OraOLEDB.Oracle.1 Provider
As noted in various ways on this question, the VS IDE (and its typical testing environment) is 32-bit, even when installed/running on 64-bit Windows, or when building for use/deployment on 64-bit Windows. My employer has a knowledgebase article discussing this.
Also, SQL Server, SSIS, and VS are always OLE DB or ADO.NET clients; they don't actually speak ODBC directly. When you tell either SQL Server, SSIS, or VS to connect to an ODBC driver or ODBC DSN, they invisibly use the Microsoft OLE DB [Bridge] Provider for ODBC Drivers for that connection.
The easiest way to work around all this, given that you explicitly want to use ODBC, is to install both 32-bit and 64-bit variants of all OLE DB (including the Bridge Provider) and ODBC components (and any libraries on which they depend, such as OCI or Oracle Instant Client), and to configure a pair of ODBC System DSNs (not User DSNs, for several reasons), one each 32-bit and 64-bit, which are named and configured identically excepting only the driver library.
This strategy works whether you're using ODBC drivers from my employer (which might be the "12-15x faster" ones referenced previously? if so, it's important to note that Enterprise Edition "concurrent users" is about actively connected clients, not installed seats), from another third-party, or from Oracle themselves.

Trying to connect to an Informix database in Visual Studio

I am trying to connect to an Informix database and need to add this reference to my project:
using IBM.Data.Informix;
What package in package manager console do I need to be able to use this library?
Thanks in advance!
To connect to an Informix database from .NET you have to options:
The Informix .NET Provider
The IBM Data Server .NET Provider
Have a look at this tech note which describes both .NET provider:
https://www.ibm.com/developerworks/data/library/techarticle/dm-1007dsnetids/
Both will work with Informix. The first one is the 'native' .NET provider included with CSDK (CSDK or ClientSDK is the product that includes all the Informix drivers (ODBC/OLEDB/.NET) etc.
At the moment the only way to get the drivers installed is with a stand alone package (Informix CSDK). There are some plans to get them in NuGet, so you would be able to get the drivers directly from the Visual Studio package manager without anything to install.
The second option, 'IBM Data Server .Net Provider' is included in the 'IBM Data Server' which is an 'common' set of drivers from IBM. It will allow you to connect to either DB2 or Informix (through a DRDA connection)
You can get the IBM Data Server Driver Package from the IBM website, or download the .NET drivers (and required libraries) directly from NuGet:
https://www.nuget.org/packages/IBM.Data.DB.Provider/
PM> Install-Package IBM.Data.DB.Provider
The .NET assembly class is called 'IBM.Data.DB2.dll' There used to be a 'replacement' dll named the same as the Informix CSDK one (IBM.Data.Informix.dll) but is now deprecated. Even with that name ;) it is fully supported against Informix databases.
There are some differences between the .NET providers (e.g. connection string) so if you are going to use the 'DB2' one, I suggest to check the documentation at:
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.swg.im.dbclient.adonet.doc/doc/c0024472.html
There is also a new beta .NET provider for the new '.NET Core' supporting both Windows and Linux platforms. If you are going to develop for .NET Core, this is the one you want
https://www.nuget.org/packages/IBM.Data.DB2.Core/1.0.0.100
PM> Install-Package IBM.Data.DB2.Core

visual basic console application error: data source name not found and no default driver specified

I had a working visual basic console application on windows 2000 that read a local Microsoft SQL database and did inserts into a remote MySQL database using Microsoft.Data.Odbc.
Then I upgraded to Windows 7 and now I get data source not found.
When I try to install Microsoft.Data.Odbc based on https://support.microsoft.com/en-us/kb/310985 the link is broken to the ODBC .NET MANAGED PROVIDER.
So I tried to use System.Data.Odbc but I get the same error.
How can I fix?
Try to install the ODBC driver
this is the link https://dev.mysql.com/downloads/connector/odbc/

What use as Database for developing asp.net vNext + Entity Framework 7 on OSX

I'm trying to set up my environment for developing asp.net vNext + Entity Framework 7 on my OSX.
Apparently, there is no provider for MySQL neither PostgreSQL yet. Thus, what can be used as database for developing on OSX?
What you folks have been doing for develop asp.net vNext on OSX? Or should I set up a Windows VM?
Any suggestion?
I've got even an open issue on Github on this topic.
Cheers
We will have a PostgreSQL and/or MySQL provider for EF7 (either delivered by our team or we'll work with a provider writer to help them build it). Work hasn't started on them yet though.
We haven't been focusing on EF7 on Mono at this stage, so there are likely some rough edges. We do have some folks who have successfully used it to connect to a remote SQL Server though.
To date, no RDBMS is supported on OSX for EF7.
Since (LocalDB)\v11.0 doesn't allow remote access and run on OSX/LNX, I've setup a SQLServer2012 Express and SQLServer 2012 Standard Edition hosted on a local Windows VM to establish a remote DB connection from my Visual Studio Code project.
From Visual Studio Code running on OSX, EF7 fails to successfully connect and interact with those local SQL Servers. In this instance, I was using the ASP.NET 5 Music Store example project: GitHub Source
Oh, and with all the SSL requirements, AZURE SQL Server is out of the question as an option.
Microsoft is heading in the right direction, we'll get there, but you're dealing with bleeding edge EF7 at the moment which is a complete reengineering from EF6.

Resources