Possible to use ODP.NET and ClickOnce?

We have an sqlserver (WinForms) application that is deployed using ClickOnce, which directly communicates with the database. If we have to transfer it to oracle, we can use ODP.NET with ClickOnce.

(Users may not have administrator rights on their PCs)

Background

This data import application is used by several users on each client site, which uses a firewall to connect to SQL Server. Most users access var using the Asp.net application or the WinForms (clickOnce) application, which negotiates with the web service.

see also " How to write a .Net application that works with both SqlServer and Oracle "

+6
clickonce
source share
4 answers

EDIT: I revised this answer for an upgrade. In addition, to clarify, ClickOnce is just an application deployment tool, how to use Oracle Client and ODP.Net with your application is still architecture-defined. Here is a summary of the most common scenarios:

Smart client applications (e.g. client application + web service)

Your client application, configured by ClickOnce, is installed on users' computers, but talks about some kind of data service. In this case, your client application does not need to distribute Oracle Client or ODP.Net.

The Oracle Client and ODP.Net package must be installed using the usual Oracle instructions on the machine hosting the server service and reference this project / application, since any other library will be used / distributed.

Fat Client Thin Deployment Applications (such as Citrix Fat Client)

Your ClickOnce-based client application is fat because it includes its own data layer and therefore must be able to connect to Oracle through a locally installed client and be able to reference ODP.Net libraries.

In this case, Oracle Client and ODP.Net packages must be installed on the host machine (for example, Citrix) using standard Oracle instructions, and your application must reference the appropriate libraries installed on its hosting.

Fat Client applications "Fat Deployment" (for example, fat-client on users computers)

In this case, your application is a typical "fat client" because it has its own data layer and should be able to communicate with the Oracle Client and ODP.Net libraries.

The specific scenario that we are discussing here is how to distribute Oracle Client and ODP.Net in your application (for example, when your users do not have these products installed on their machines). Following are the instructions:

  • Download the Oracle Data Access Components data package .

    (A) The current version is ODAC 11.2 Release 4 (11.2.0.3) and includes support for Microsoft Entity Framework 4.

    (B) You will need the 32-bit version of ODP.Net installed since Visual Studio is a 32-bit application. You can then compile the target processor and version of the bits during deployment.

  • The ODAC package contains the Oracle Instant Client and ODP.Net libraries. You need to copy the libraries of instant clients into your application and set them to "Always Copy"

  • Link Oracle.DataAccess.Client, like any other lib, and set Copy Local = True .

  • The connection string should look like a regular entry in the TNSNAMES.ORA file:

      Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SID = oracle_world_here)));User Id=schema_here;Password=password_here;Persist Security Info=TRUE; 

Notes

but. There are two main versions of the instant client: the full version (about 115 MB), which includes support for several languages, and the Lite version (about 28 MB) that supports only English.

B. IMPORTANT Ensure that the libraries deployed are all from the same client version - this means that when you deploy 32-bit ODP.Net, you need to deploy 32-bit instant access client libraries. If you are using 11.2 instant client, you cannot use 11.0 ODP.Net etc. - silly, but many people do not notice it; Use a good source of control.

C. My experience, the following libraries were put at the root of my project (to avoid any permission problems or% PATH%)

oci.dll, ociw32.dll, orannzsbb11.dll, oraocci11.dll, oraociicus11.dll, oraops11w.dll


Summary and results:

Now you can use ClickOnce deployments for all Windows Client applications - fat, subject or smart.

+7
source share

Instant Client supports xcopy deployment, so the same approach (including them in ClickOnce deployment) should make it OK for deployment.

But! In many cases, it may be more appropriate (with ClickOnce) to use the smart client approach, i.e. Access data through a server application through web services. Then you do not need any DAL components on the client.

+3
source share
+1
source share

XCOPY deployment is the closest to what you plan right after deployment with ODP.NET.

I just answered one of your posts, here will be a lot of details about XCOPY deployment.

Please see:

How to write a .Net application that works with both SqlServer and Oracle (now that System.Data.OracleClient is deprecated)

Christian Shay Oracle

EDIT: Oracle announced that in 2011 they will release a fully managed version of the ODP.NET provider (aka thin client). When this happens, ODP.NET will not be dependent on any other files, and the deployment of ClickOnce will be easier.

Feel free to let us know about this and other future features on our feature request website: http://apex.oracle.com/pls/apex/f?p=18357:46

0
source share

All Articles