Alternative Oracle drivers for .net - c#

I have to develop a tool in C# that retrieves some data from an Oracle DB. Since our IT support is having some trouble with installing the Oracle client, I want to be able to connect to the database without the client installed.
The idea is to just install (and maybe register) an additional library together with the app.
Which alternatives to the Oracle client exist, and what are their pros and cons?
This is for a small application (1 form, 2 or 3 queries, the result displayed in a DataGrid, probably no more than 10-20 data sets), but I am also interested in scalability issues, since we may also move away from the Oracle client with bigger future projects.
Of course a freeware solution would be nice, but we are not limited to that.

Your task can be achieved without the need of any third party software:
Install Oracle Data Access Components 11g in your development box. ODAC 11g is backwards compatible with 9i and 10g
Add a reference to the ODAC library in your .NET projects (Oracle.DataAccess.dll).
Allow your application to connect without the use of TNSNAMES.ORA. To do so, you have to include the connect descriptor in the connection string:
"user id=scott;password=tiger;data source=" +
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)" +
"(HOST=sales-server)(PORT=1521))(CONNECT_DATA="+
"(SERVICE_NAME=sales.us.acme.com)))"
Since you are including the connect descriptor in the connection string, the thin client is not required in the targeted computers.
Happy deployment.

There are a couple different flavors of the Oracle ODP.Net driver. Which version are you trying to use?
It sounds like you want the Oracle 11g ODAC 11.1.0.6.21 with Xcopy Deployment, which allows you to deploy the Oracle Instant Client and the ODP.Net driver just by copying a few DLLs over and registering them. That doesn't require a full-blown Oracle client installation.

Oracle currently has a version of ODP.NET that is fully managed, allowing developers to connect to Oracle databases while referencing only a single DLL. There's more information here.
Current releases can be found here.

The enterprise library client System.Data.OracleClient is a viable alternative to the ODP.NET provider from Oracle. There are severla caveats you should know though, using the Microsoft client will make it extremely difficult to work with any type of large objects whether they are XML strings, CLOBs, LOBs or BLOBs. Also the Oracle XmlType column is not supported and must be casted to a CLOB to be returned into the OracleClient.

Related

C# - connecting to DB2 z/os mainframe without a license

Problem:
I have a c# application that requires read and write access to DB2 z/os on mainframe.
I've searched around for weeks and came up with the conclusion: either go with IBM drivers (which requires a license file, or DB2 connect, or some sort of licensed software) or go with ole DB provider for db2 (host integration server) by Microsoft.
Microsoft option is free, just need to install the drivers, no need a license file. IBM option requires a DB2 connect software and a license (even if you use the ibm nuget package, it requires you to have the license file)
Questions:
1) can I do this for free meaning no license purchase? Aside from the Microsoft option?
2) is it possible to deploy the project to a machine without having to install any drivers? (Kinda like ibm's self contained nuget package) but you know, not requiring a license file?
Thanks in advance! P.S. the DB2 server is remote, not local
IBM-provided Db2 drivers always require proper Db2 Connect licenses to access Db2 for z/OS.
Those are not always costly, this totally depends on the environment and the requirements.
Microsoft’s drivers seem to be free, however, when using them, consider:
the potential challenges when requesting the support from IBM - they will not agree to debug driver vs database interaction issues, and Microsoft will not help you unless you pay them;
possible compatibility issues, including the lack of support for the latest functions and limited compatibility with newer Db2 fixes (even within the single major Db2 version).
If those two things are not really important for you in your specific situation, you can avoid the need to pay for Db2 Connect by using Microsoft’s drivers :-)
As cschneid suggested, it IS possible to connect a c# application (or any a .NET application) to DB2 (Version 11 and up) for z/OS on mainframe through REST services. You just end up requesting and getting responses via JSON objects. You just need to make sure that DB2 is configured to handle REST calls (especially if you're using HTTPS)

Oracle Database connectivity issue with C# and Delphi-7

Windows form application build in C# is unable to fetch the data from Oracle database without Oracle Client installed on the system, whereas the same exe build with Delphi7 platform + ODAC fetches data from Oracle without Oracle Client installed.
Can anyone explain the reason??
Connection with Delphi may be possible since it will be using BDE or Third party component like ToracleSession,TOraSession . These components do not require Oracle client installation.
Refer Following link for example --
https://www.devart.com/odac/faq.html
Refer Below link to connect to oracle without using oracle client.
https://begeeben.wordpress.com/2012/08/01/accessing-oracle-database-without-installing-oracle-client/

Is it required that postgresql is installed on every client computers when retriveing or storing data?

I need your help to answer a question.
I coded a basic c# portable exe application that uses an Access Database on a server computer. On the network there are some client computers that runs this application and retrieve and store data via this database placed on the server computer in a shared folder. Every client coputer can access my database with this connection string:
#"Provider=Microsoft.ACE.OLEDB.12.0;Data Source =\\ANKFILESERVER1\aractakip\DatabaseAd.accdb
So far, there has been no problem. But as known, Access (Oledb) database has a limited capacity to save datas and since i'm worrying that someone change or delete my database files -authenticated for everyone- i decieded to use another database platform like postgresql.
My question is, if i install postgresql on the server computer and migrate my database tables, Are every client computers needed to install postgresql to access my database tables? If yes, what should be my connection string?
Thanks in advance.
You will need a client driver - like psqlODBC - installed on each computer that connects to PostgreSQL via MS Access, yes.
You can install psqlODBC separately, or using the main PostgreSQL installer. The separate psqlODBC-only installer is an msi that can be deployed over Active Directory, making management easier.
The connection options are covered in the psqlODBC documentation.
Microsoft Access is really written for the Microsoft JET / OLEDB engine, and to communicate with Microsoft SQL Server. It works with PostgreSQL, but it doesn't fully "understand" all PostgreSQL's features. It also does some things in totally non-SQL-standard ways that work on MS SQL but do not work on PostgreSQL. So it can be awkward to use MS Access with PostgreSQL due to things like Access not really supporting SEQUENCEs properly. Note, though, that I haven't used Access since Office 2008, so things may have improved.

Workaround for 'System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.'

I need a workaround on this issue that I am currently facing. I am retrieving records from the oracle database using Enterprise Library DAAB, but when I reached the ExecuteReader method call, I get this error. I checked other links for solutions which says that I need to install the client to be able to fix this but still no avail.
The server which I am connecting to is (i think) of a lower version based on the error. It would be fine if I were to install it, but this is out of my jurisdiction as this is handled by the DBA.
I would like to know if there is any other way for me to retrieve records. Do I need to use the openquery() or not?
I would recommend to use the required OCI client. Oracle will never give any support unless the setup fully complies to the 'supported configurations' chart.
Another option that is less intrusive than getting a DBA or administrator involved is using the new Oracle Managed provider for ADO.NET. This doesn't need an OCI client to be installed.

Good options for a MySQL Lighter version

I have a C#.NET application which connects to a MySQL database in a server.
I have a requirement to do some operations offline.( When the client machine does not have internet and cannot access the MySQL database.) My Plan is to create a MySQL database in local machine. Copy all files required to the local database and perform required operations. When the client machine have the access to the MySQL sever copy back the changed files to the server database.
My question is what are the good Options to use as local MySQL. Is there any lighter version of MySQL available?
I also need to install selected MySQL version with the windows installation package generated for my software.
Thanks in Advance.
When I have these situations I usually fall back to SqlLight. Its a simple embeddable database, and if you are using only the simplest insert /select statements you should not need to maintain much difference between your local database access vs the remote database access.
That said. If you are using something that is not that simple it's usually a good advice to bite the bullet and do the whole mySql install thing on the local machine. Because the maintenance of 2 sets of database access will eat up development time like nothing else.
In your case I would use an embedded database with your offline application, something like FireBird where you don't need to install a 3rd party database etc. The FireBird dll's are linked and part of your application deployment. http://www.firebirdsql.org/

Categories

Resources