Solved

Makign Oracle connection on Windows 2008 64 Bit  thru Vb.net using provider - msdaora.1

Posted on 2011-09-22
5
2,130 Views
Last Modified: 2012-05-12
Hi all

We have vb.net application. That works perfectly fine on Windows 32 Bit machines including
windows xp  32 bit , windows 2003 server 32 bit , windows 2008 32 bit server

we follow as under :-
a) Install Oracle database
b) Install Dot Net Framework ver 2.0 or higher
c) We run vb.net application which builds connection with Oracle database as under
Dim adocon As New OleDb.OleDbConnection
tConnstring = "Provider=MSDAORA.1;Password=" & nPassword & ";User ID=" & nUserName
adocon.ConnectionString = tconnString
adocon.Open()

The same application does not work in Windows 64 Bit Machine 2008 Server and we get following error

MSDAORA.1 provider is not registered on the local machine

We also tested using msdaora.dll , msdaorar.dll  from windows 32 bit machine into windows 64 machine in windows\system32 folder but we are not able to register these dll files using regsvr32  msdaora.dll

using provider as given by Oracle
we are able to connect to Oracle 11g with vb.net using

Provider=oraoledb.oracle.1

This provider is provided by Oracle and works well

when we use this oracle provide - Only simple report querries work but complex queries which used to work using msdaor stopped working  in vb and reports errors and as such we can not
use oracle provider

Kindly advise some solution to make connection with Oracle Database. We wish to use the same provider

Suresh Bansal
0
Comment
Question by:suresh_bansal
  • 2
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
heskyttberg earned 300 total points
ID: 36585228
See http://stackoverflow.com/questions/5298680/cant-connect-to-oracle-from-win-2008-r2
and http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html for oracle library download.

Microsoft no longer supply connection libraries to Oracle, you need to change to Oracles own libraries.
Wich means you will need to rewrite your connection code for your application.

Regards
0
 

Author Comment

by:suresh_bansal
ID: 36585258
Hi

Link definitely shows too many provides for Visual Studios .Net environments

Problems are
a)  They shows different providers for different Oracle Versions which make the things too comlicated
     msdaora  provides is working perfectly with all versions of Oracle but it runs from 32 Bit clients only.
    However it works well with Oracle 32 Bit as well as Oracle 64 Bit versions

b) We are not able to find out which provider will work for 64 Bit windows clients in Windows from the huge list of Providers

c) How do we know the syntix for connecting to Oracle using Vb.net environment  which were like
 tConnstring = "Provider=MSDAORA.1;Password=" & nPassword & ";User ID=" & nUserName for
using msdaora provider

We are interested for One oracle provider which can work in 64 bit windows clients but for all Oracle versions may be 32 bit 10g, 64 bit 10g   or 64 11g or 32 bit 11g etc.

Suresh Bansal


0
 
LVL 8

Expert Comment

by:heskyttberg
ID: 36586540
If you install the 64-bit client working for latest oracle it should work against previous versions of oracle DB too. It is just tjat an older version does not work with the newer DBs and OSes.

It will still just be one provider, but you need install the client libraries on server , app servers, eventually clients and so on.

But the provider will be oracle instead of Microsoft.

http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html

This will give you all information you need to code and make connection and connection strings with the new client.

I not really sure how far backward compatibility the libraries are from .net , but with SQLPLUS you can connect form 11g to both 10g and 9i at least so it should be same for .net connections.

I not a programmer only DBA so I can't say exactly how to make connection string , vut this link with example code and tutorials from Oracle should point you in the right direction.

Regards
0
 
LVL 15

Assisted Solution

by:x77
x77 earned 200 total points
ID: 36587622
1 - Verify that your Oracle installs is 64 bits (I don´t know any)

If your oracle Dll´s  or any other product you nee are 32 bits, your application needs run on 32 bits.

To do this :

   Go Project properties - Compiler tab.
   Press the advanced button - Change from "Any" to "x86"

To Connect a Oracle Database 11, you need a Oracle Client version 8.5i or superior.
To create a correct OleDb Connection:

Goto Project Properties - Settings Tab
Add a new Setting (CnStr as sample), Select Type - Connection String (At end of list), click "..." in Value.
A Dialog allows you create the connection string and test it.

Using Oracle OleDb - Recomended:
Provider=OraOLEDB.Oracle.1;Data Source=MyOracle;Persist Security Info=True;Password=MyPwd;User ID=MyUsr

Using Microsoft-Oledb for Oracle:
Provider=MSDAORA.1;Data Source=MyOracle;Persist Security Info=True;Password=MyPwd;User ID=MyUsr

You can also if your Oracle Client includes Oracle.DataAccess (Folder ODP)

If you have ODP, use it, is the best option.
It supports Insert/Update/delete using Arrays (you can insert 100 rows with one Command.ExecuteNotQuery by sample).
0
 

Author Closing Comment

by:suresh_bansal
ID: 37175021
Comments were useful but solution was not as desired

Suresh Bansal
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Advice in Xamarin 21 79
Exit the loop 4 42
How to open form using item in Listbox. 8 21
How to seperate number and letters from a string 3 9
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question