您的当前位置:首页正文

delphi 为什么不能连接oracle

2023-11-09 来源:帮我找美食网

delphi 为什么不能连接oracle

问题处理:加一句OraSession1.Options.Net := True;

delphi 为什么不能连接oracle

标签:

小编还为您整理了以下内容,可能对您也有帮助:

delphi7连不上oracle12

在64位的机器上安装32位的Oracle客户端。delphi7连不上oracle12可以在在64位的机器上安装32位的Oracle客户端,这样的话便连接成功,Delphi 7连接oracle数据库时没有Oracle Provider for OLE DB选项 用Microsoft OLE DB Provider for Oracle 连接数据库时,偶尔会报错,是因为这个驱动不支持BLOB字段。

delphi7连不上oracle12

在64位的机器上安装32位的Oracle客户端。delphi7连不上oracle12可以在在64位的机器上安装32位的Oracle客户端,这样的话便连接成功,Delphi 7连接oracle数据库时没有Oracle Provider for OLE DB选项 用Microsoft OLE DB Provider for Oracle 连接数据库时,偶尔会报错,是因为这个驱动不支持BLOB字段。

Delphi unidac连接oracle问题,一个很奇怪的问题?

这应该和oracle服务器的设置或者版本有关,我的程序在大多数现场运行正常,但在某些现场会出现不识别SID的问题,数据库是客户创建的,而不是我们自己设计的,版本号也各不相同。遇到这个问题,我就不使用uniconnection了,改为ado,安装oracle客户端配置服务名再访问。

Delphi unidac连接oracle问题,一个很奇怪的问题?

这应该和oracle服务器的设置或者版本有关,我的程序在大多数现场运行正常,但在某些现场会出现不识别SID的问题,数据库是客户创建的,而不是我们自己设计的,版本号也各不相同。遇到这个问题,我就不使用uniconnection了,改为ado,安装oracle客户端配置服务名再访问。

Delphi ADO 连接 Oracle

前提:你必须装Oracle客户端
然后使用AdoConnection控件,点击ConnectionString属性右边的...,在弹出的窗口中点击"Build",选择"Microsoft OLEDB for Oracle",下一步,设置Oracle相关的实例名、用户名、密码等就行
了,其他的DataSource什么的和连接其他数据库没有区别。
不过不推荐你使用MS ADO,因为这样比较慢,而且损失了Oracle的一些高级特性,同时要求机器上还必须有Oracle的客户端。可以使用ODAC或者Direct Oracle控件,能够直接连接Oracle,而且不需要安装Oracle客户端!(和数据库服务器通讯的部分这些控件用Delphi重写了)

Delphi ADO 连接 Oracle

前提:你必须装Oracle客户端
然后使用AdoConnection控件,点击ConnectionString属性右边的...,在弹出的窗口中点击"Build",选择"Microsoft OLEDB for Oracle",下一步,设置Oracle相关的实例名、用户名、密码等就行
了,其他的DataSource什么的和连接其他数据库没有区别。
不过不推荐你使用MS ADO,因为这样比较慢,而且损失了Oracle的一些高级特性,同时要求机器上还必须有Oracle的客户端。可以使用ODAC或者Direct Oracle控件,能够直接连接Oracle,而且不需要安装Oracle客户端!(和数据库服务器通讯的部分这些控件用Delphi重写了)

Delphi7连接Oracle提示“未找到Oracle 客户端和网络组件”。Win7系统64位。Oracle10G客户端已安装且能连接

今天在测试ASP.NET程序,在连接ORACLE数据库时报出了“Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed”的错误。可我本机上确确实实已经装了Oracle Client,而且在我本机上运行时也正常,一旦通过IIS发布,在运行时就会报上述错误。通过查找网络资料,该问题已经成功解决。现将解决过程发布,供大家参考。

首先,把可能出现该问题的情况简单阐述一下:a:Oracle 9.02i 版的问题b:是NTFS格式分区造成的。Oracle公司对此问题也给出了描述:Problem Description ------------------- When running an application that connects to Oracle and uses the Authenticated User privilege (such as Microsoft’s Internet Information Server (IIS)) via Oracle’s 9.2 client software and any of these programmatic interfaces 1. Oracle Provider for OLE DB 2. Microsoft OLE DB Provider for Oracle 3. Oracle ODBC Driver 4. Microsoft ODBC for Oracle 5. Oracle Objects for OLE (OO4O) you will receive one of the following errors: (1) Oracle Provider for OLE DB Error Type: Microsoft OLE DB Service Components (0x80070005) Access is denied. (2) Microsoft OLE DB Provider for Oracle Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. Or Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle error occurred, but error message could not be retrieved from Oracle. (3) Oracle ODBC Driver Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified driver could not be loaded e to system error 5 (Oracle in OraHome92). (4) Microsoft ODBC for Oracle The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation. You will be unable to use this driver until these components have been installed. (5) Oracle Objects for OLE (a) while using a GLOBAL.ASA file Error Type: Active Server Pages (0x0) An error occurred while creating object ’OraSession’. (b) not using a GLOBAL.ASA file Error Type: Microsoft VBScript runtime (0x800A0046)Permission denied: ’CreateObject’ (6) Other miscellaneous errors (a) The Specified Mole Could Not Be Found

接着,我们来解决此问题,方法很简单,找到ORACLE_HOME文件夹,右击—〉属性—〉安全,选Authenticated Users,查看它的属性,将Read and Execute的勾先去掉(默认情况下该勾是选中的),在勾上,然后重新启动你的机器,在运行程序,该问题就成功解决了。ORACLE公司也给出了解决方案:Solution Description -------------------- You need to give the Authenticated User privilege to the Oracle Home by following these steps: 1. Log on to Windows as a user with Administrator privileges. 2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME directory. 3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear. 4. Click on the "Security" tab on the "Properties" window. 5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names"). 6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users"). This box will be under the "Allow" column. 7. Check the "Read and Execute" box. This is the box you just unchecked. 8. Click the "Apply" button. 9. Click the "OK" button. 10. You may need to reboot your computer after these changes have been made. Re-execute the application and it should now work. Explanation ----------- If you install Oracle9i Release 2 (9.2.0.1) on a computer running Windows with an NTFS partition, the contents of ORACLE_HOME directory will not be visible to users who are authenticated on that machine. These permissions were not set properly when the software was installed. Applications that were working fine with previous versions of Oracle software will stop working when they upgrade to Oracle 9.2. NOTE: The application will continue to work if the user has logged onto the machine as an Administrator. Any application that is using the Authenticated User privilege will not work. A notable example would be IIS which might service some of the requests based on the Authenticated User privileges. To demonstrate the problem in further detail, you can log on to the operating system as an authenticated machine user. You won’t be able browse the contents of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs or make a connection. References ---------- Bug:2498880 - Oracle 9I Release 2 Installation Issue on Windows 2000 NTFS File System Additional Search Words ----------------------- OLEDB

需要注意的是:在XP系统下,属性中可能找不到安全选项卡,如何去解决呢?很简单,打开一个窗体,选择“工具”—〉文件夹选项...—〉查看,将使用简单文件共享前的勾去掉,确认即可(如下图)。追问这个方法试过了。

无法建立Oracle连接。

可能有以下几种原因:
1、windows防火墙没关。
2、你的服务器的oracle监听没开
3、参考下面的网址:
http://blog.163.com/beyond_qh/blog/static/706383720092227123685/

※我今天使用jdbc连接oracle的时候也是连接不上,原因是因为服务器的oracle监听服务没开,开了就好了,但是值得提一下的是我用的tomcat,因为先开监听结果把8080端口占用了,所以先关了监听,又开的tomcat让tomcat先占用8080端口,后开监听这样监听就不占用8080端口了。

---
以上,希望对你有所帮助。

无法建立Oracle连接。

可能有以下几种原因:
1、windows防火墙没关。
2、你的服务器的oracle监听没开
3、参考下面的网址:
http://blog.163.com/beyond_qh/blog/static/706383720092227123685/

※我今天使用jdbc连接oracle的时候也是连接不上,原因是因为服务器的oracle监听服务没开,开了就好了,但是值得提一下的是我用的tomcat,因为先开监听结果把8080端口占用了,所以先关了监听,又开的tomcat让tomcat先占用8080端口,后开监听这样监听就不占用8080端口了。

---
以上,希望对你有所帮助。

delphi如何连接oracle数据库

Delphi作为强大的数据库前端开发工具,提供了很多数据库存取方式的封装控件。对于Oracle的数据存取控件,不管何种数据库引擎,一般都会封装一个Connection作为数据集的连接控件,因此只要设定Connection的相关属性即可,其它dataset控件,如query,table等只要指定此Connection即可,客户端应用程序要连接到Oracle的Schema,一般都需要安装Oracle Client,并使用Net Manager设置客户端可以访问的Oracle Database Server的主机名称及存取协议、Port等信息。可以使用以下的方式连接

    dbExpress:dbExpress比较适合连接SQL的数据库,据说效率挺高的。放置一个dbExpress页签下的SQLConnection,在此控件上点击鼠标右键,选择“Edit Connection Properities”功能,并依下图设置即可。其中Database栏位要设置为Oracle Client中设置的服务名,如果需要记住密码,而不用每次连接的时候输入密码,请将 LoginPrompt属性设置为False,设置OK后即可测试将Connected:=True看看是否成功,其它数据处理控件请选择相应dbExpress页签下的控件即可。

    BDE:BDE应该来说是Borland自己的数据库引擎了,效率也是相当不错的。当然也是支持Oracle连接的。使用BDE页签下的database控件,设置方法参考下图所示:

    ADO:ADO是Microsoft所支持的数据库连接技术,大有一统windows客户端数据存取引擎的意思,在.net平台,推出了ADO.NET,更好地支持了XML。DELPHI有对ADO做了一些封装,使用ADOConnection,通过向导设置它的ConnectionString即可,可以参考下图所示:

    ODBC:ODBC是最传统的链接方法了,效率相对来说稍微低一些,不过通用性也更强,不建议使用这种方法。使用前需要先到ODBC设置中增加一个数据源名称DSN,然后再透过ADO或者BDE组件来实现数据的存取。可以参考如下图片设置:

    不使用控件,比如使用原生的ADO组件,不太建议这种方法,既然Delphi已经做了封装,何必又要回到原始状态呢。以上连接方法都需要安装Oracle Client软件,但是Oracle官方的Client太过庞大,安装非常不便,目前网上有人发布一个精简版的Oracle Client软件,比较小,可以满足连接Oracle的需要,可以去下载这个软件,而不用去安装复杂的官方版本。

    下载ODAC控件,此控件不需要安装Oracle Client,而是使用OCI的方式透过TCP/IP协议直接连接到Oracle Server,可以将程序做成瘦客户端,程序分发的时候比较方便。此控件支持Delphi的大部分版本以及C++Builder以及kylix以及.net,而且提供源代码,有兴趣的可以研究一下。具体安装使用方法请参考控件的相关说明以及帮助文档。

突然连接不上Oracle数据库了,能给点建议吗

数据库不能连接一般分两种情况,一种是用户名密码错误,另一种是配置不正确。

一、密码错误:

向数据库管理员索取正确用户名密码即可。

二、配置错误:

设置方法如下:

1、找到$ORACLE_HOME/client_1/network/admin目录下的tnsnames.ora文件,并用文本模式打开。

2、添加以下内容:本地实例名= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 数据库<a href="https://www.baidu.com/s?wd=IP%E5%9C%B0%E5%9D%80&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YvuW-9PHbvuHR3rAf1uAFB0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmLPH63rjRL" target="_blank" class="-highlight">IP地址</a>)(PORT = 端口号)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = 服务名) ) )

Top