Solved

Connecting to Oracle without connecting to any client tools

Posted on 2006-11-02
15
453 Views
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;" & _
            "Pwd=mypassword"
        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;";

        Try

            oODBCConnection.Open()

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        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).

0
Comment
Question by:rkneal
  • 7
  • 5
  • 2
  • +1
15 Comments
 
LVL 35

Expert Comment

by:Raynard7
ID: 17862377
Hi,

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.
0
 
LVL 15

Expert Comment

by:dave4dl
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)
0
 
LVL 15

Accepted Solution

by:
dave4dl earned 250 total points
ID: 17862409
Here is a .NET managed provider for Oracle (since you are using vb.net):
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=4F55D429-17DC-45EA-BFB3-076D1C052524
0
 

Author Comment

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

Expert Comment

by:dave4dl
ID: 17862482
A link about the old ms oracle odbc driver:
http://support.microsoft.com/kb/175018

I assume it is still included in MDAC
0
 
LVL 15

Expert Comment

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

Expert Comment

by:dave4dl
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rkneal
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.

0
 
LVL 15

Expert Comment

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

Author Comment

by:rkneal
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.

thanks
0
 
LVL 15

Expert Comment

by:dave4dl
ID: 17863141
I would recommend using web services

OR

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.
0
 

Author Comment

by:rkneal
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.
0
 
LVL 4

Assisted Solution

by:SkipFire
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.
0
 

Author Comment

by:rkneal
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!
Bob

0
 
LVL 4

Expert Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Often, when running a query with joins, the results show up "duplicates", and often, those duplicates can be "eliminated" in the results using DISTINCT, for example. Using DISTINCT is simple: just add it after the SELECT keyword, an…
I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
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…

757 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

22 Experts available now in Live!

Get 1:1 Help Now