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

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
suresh_bansalAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
heskyttbergConnect With a Mentor Commented:
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
 
suresh_bansalAuthor Commented:
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
 
heskyttbergCommented:
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
 
x77Connect With a Mentor Commented:
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
 
suresh_bansalAuthor Commented:
Comments were useful but solution was not as desired

Suresh Bansal
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.