Solved

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

Posted on 2011-09-22
5
2,085 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now