Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Connecting to Oracle without connecting to any client tools

Posted on 2006-11-02
Last Modified: 2011-09-20
I know this has probably been asked before, but is it possible to have a program that connects and retrieves data from Oracle without having to load any Oracle Client tools, dll's, etc.  We have about 5000 PC's that i need to push this program to that when the user logs in, it connects to oracle, gathers info, then disconnects.  I definitely cannot load anything else than this one executable, so loading oracle client tools out of question.   Is this possible to do this without loading anything else on machine?  

I have tried the following but keep getting the error at bottom of page  (using vb.net)

Imports System.Data.Odbc

Module Module1
    Public Function testoracleFunction()

        Dim oODBCConnection As Odbc.OdbcConnection
        Dim sConnString As String = _
            "Driver={Microsoft ODBC for Oracle};" & _
            "Server=myserverDNSname;" & _
            "Uid=myuser;" & _
        oODBCConnection = New Odbc.OdbcConnection(sConnString)
'connection info from tnsnames just for info only
        'string oradb = "Data Source=(DESCRIPTION="                  
        '            + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myserverDNSName)(PORT=1621)))"
        '           + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxx)));"
        '          + "User Id=myuser;Password=mypassword;";



        Catch ex As Exception
        End Try

    End Function

End Module

error message
[Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

Question by:rkneal
  • 7
  • 5
  • 2
  • +1
LVL 35

Expert Comment

ID: 17862377

Unfortunatley the answer is no,
unless you want to create a server application that receives queries - passes them through the oracle client and then returns the data that was submitted through the client.

however with 5000 users this is liable to be too much for one machine to handle.
LVL 15

Expert Comment

ID: 17862389
if you dont want to use any oracle dlls microsoft used to offer an oracle odbc (or maybe it was oledb) driver for oracle.

I would recommend using the oracle oledb driver though (available at http://www.oracle.com/technology/software/tech/windows/ole_db/index.html)
LVL 15

Accepted Solution

dave4dl earned 250 total points
ID: 17862409
Here is a .NET managed provider for Oracle (since you are using vb.net):
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.


Author Comment

ID: 17862414
but won't that driver have to be pushed to every pc?
LVL 15

Expert Comment

ID: 17862482
A link about the old ms oracle odbc driver:

I assume it is still included in MDAC
LVL 15

Expert Comment

ID: 17862486
it would have to be on every pc you were connecting to the database from
LVL 15

Expert Comment

ID: 17862509
If you have administrative control over these pcs you could just write a script to copy and register the driver on all the pcs and kick it off before you go home one night.

Alternatively you could write your app so that the database access occurrs on a separate tier (only one or a few computers) and all the clients get their data through that tier.

Author Comment

ID: 17862625
i think the multi-tier approach is my only option. there is no way i will be able to push out to all these PC's drivers, dll's, etc.  
Now the question is the most robust way to do this.  I hate to make it a web service that gets data, then have to rely on IIS being up and running.

I am thinking of installing a rshd service on the server, then each client can call rsh.   Any other ideas to make it as quick, robust as possible.

LVL 15

Expert Comment

ID: 17862959
what kind of app are you making (office addin, web site, stand alone, etc)?

Author Comment

ID: 17862985
Here is what program will do so will help

1.  It should be a single .exe that is pushed through software distribution to everyone's startup folder
2. When a person logs in, this program will get run
3. The program will go out to oracle and return the record of the logged in user and one other field that provides security information
4. Program disconnects
5. using this security information we will manipulate registry setttings/key files
6. The oracle table gets updated each night so any changes we can pick up when users logs in each day

Thought this would be simple, now finding out creating a connection/query to an oracle database from a single standalone application requires dll's, possibly oracle clients, etc, etc.

May have to go to a single server talking to oracle to get information, and the .exe talks to the server and requests the info.   My programmers are telling me to use IIS and a web server, i am thinking of loading rshd on the server, and sending an rsh command to avoid IIS if can.

LVL 15

Expert Comment

ID: 17863141
I would recommend using web services


push out driver files with the exe and connect directly to Oracle.  This way you must reference the dlls directly in your exe or you have to register them after they are pushed out.

Author Comment

ID: 17863169
could i get down to a single DLL or driver?  I think i could live with pushing out one DLL with the exe have to push anyway. I could register it upon program startup so references are there. But, if need a ton of other support files, then web service sounds like way to go.

Assisted Solution

SkipFire earned 250 total points
ID: 17955836
You could look at DataDirect, but I'm not sure what kind of budget you are on.  It would require an extra .NET DLL, but if you wanted to be really creative you might be able to add it as an embedded resource in the EXE and get it that way.  It does not require the Oracle Client tools like most of the Oracle drivers do.

Author Comment

ID: 17956027
i used a product from www.crlabs.com.  (corelabs).  For $150 can send just one .DLL and my EXE and get to Oracle data all day long without having any other oracle clients installed, pretty awesome!


Expert Comment

ID: 17956102
Thanks, I had been looking for a cheaper alternative to DataDirect.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

840 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