连接到Oracle数据库从VB 2008的应用程序,而无需安装Oracle软件? [英] Connect to Oracle DB from VB 2008 application without installing Oracle software?

查看:296
本文介绍了连接到Oracle数据库从VB 2008的应用程序,而无需安装Oracle软件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Imports System.Data.OleDb

Public Class Log

    Private mConnectionString As String = "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))(CONNECT_DATA=(SID=xxx)(SERVER=DEDICATED)));User Id=xxx;Password=xxx;"
    Dim ds As New DataSet
    Dim da As New OleDbDataAdapter
    Dim dr As DataRow
    Dim Connection As New OleDbConnection(mConnectionString)
    Dim Command As OleDbCommand
    goes on...

这就是code,它的伟大工程,我们的发展机。我们都安装了我们的机器在Oracle供应商。现在,我尝试使用这个code在一个应用程序上的另一台计算机没有安装Oracle软件,它不能正常工作。

That's the code, and it works great on our development machines. We all have the Oracle providers installed on our machines. Now I tried using this code in an app on another machine that does not have the Oracle software installed and it doesn't work.

现在我知道我可以在这些机器上安装Oracle供应商,它会工作。这一问题是A)有很多和B)我必须要经过我们的IT部门,这将需要六个月为他们做到这一点。所以我的问题是,我可以连接到该Oracle数据库从一台计算机没有安装Oracle供应商?我认为微软有它自己的Oracle提供,但它并没有System.Data这下显示出来。 .NET版本是3.5是否有帮助。有任何想法吗?

Now I know I can install the Oracle providers on these other machines and it will work. Problem with that is A) there are many of them and B) I'd have to go through our IT department and it would take six months for them to do it. So my question is, can I connect to this Oracle database from a machine without the Oracle providers installed? I thought Microsoft had it's own Oracle provider but it doesn't show up under System.Data. The .NET version is 3.5 if that helps. Any ideas?

推荐答案

我有相当好的运气了的 Oracle即时客户端 ODP.NET ,这是pretty的多直XCOPY部署(如果你不需要ODBC)。

I've had fairly good luck with the Oracle Instant Client and ODP.NET, which is pretty much a straight XCOPY deploy (if you don't need ODBC).

IIRC,你就需要修改PATH环境变量,但这是相对容易 - 尤其是与甲骨文用来做你跳通过箍

IIRC, you do need to modify the PATH environment variable, but that's relatively painless - especially compared to the hoops Oracle used to make you jump through.

这篇关于连接到Oracle数据库从VB 2008的应用程序,而无需安装Oracle软件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆