前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PowerBuilder的搜索

PowerBuilder连接Oracle数据库,Oracle,数据库 在线留言 | Alexa查询 | 在线工具 | 技术论坛 | 会员注册 | 繁文 首页 WEB编程 WEB设计 WEB标准 脚本特效 WEB安全 数据库 开发工具 资源下载 WEB资讯 欢迎访问阿里西西WEB开发技术网站! → ASP编程| PHP编程| JSP编程| ASP.NET| C#.NET| VB.NET| Cgi/Perl| XML/RSS| → WEB设计软件| WEB设计艺术| WEB设计规范| WEB设计欣赏| → HTML| XHTML| CSS样式表| → JavaScript| VBScript| → WEB服务器| WEB黑客攻防| WEB攻防工具| → ACCESS| MSSQL| MySQL| Oracle| PowerBuilder| FoxPro| DB2| → Dreamweaver| FrontPage| Fireworks| FLASH| Ultradev| 精品工具| → 电子教程手册| 语言参考手册| 网站开发文档| 精典源码函数| → 互联网新闻| WEB市场推广| WEB程序员专栏| ACCESS MSSQL MySQL Oracle PowerBuilder FoxPro DB2 首页 / 数据库 / Oracle / [Oracle] PowerBuilder连接Oracle数据库 作者:[转载] 文章来源:http://www.alixixi.com/ 更新时间:2005-12-13 Connecting to Oracle from PowerBuilder 5.x, 6.x and 7.x using Oracle ODBC Drivers SUMMARY: This document is designed to provide assistance in making your connection to Oracle from PowerBuilder using ODBC drivers provided by Oracle. Document ID: 44571 Last Revised: 08/12/99 Topic: Connectivity Document Type: Tip Product: PowerBuilder Version: 7.0; 6.0; 5 Platform: PC Operating System: Windows 95, Windows 3.1, Windows NT Document:   Overview   This document is designed to provide assistance in making your connection to Oracle 7.x and Oracle 8.x from PowerBuilder 5.x, 6.x and 7.x using ODBC drivers provided by Oracle. PowerBuilder 7.x can not be run under a 16 bit environment. This document is a supplement to the information regarding ODBC data sources provided in the Connecting to your Database manual.   Determine Oracle Client Software Version   Windows 3.1x (16 bit)   If you are running a Windows 3.1x operating system, you must use 16 bit PowerBuilder along with 16 bit Oracle client software to connect using the 16 bit Oracle ODBC drivers. ORAWIN is the default Oracle Home directory for 16 bit Oracle. This applies when using SQL*Net v2.x.   Windows 95, Windows98/Windows NT (32 bit)   If you are running a Windows 95, Windows 98 or Windows NT operating system, you must use 32 bit PowerBuilder along with 32 bit Oracle client software to connect using the 32 bit Oracle ODBC drivers. ORAWIN95 is the default Oracle Home directory for 32 bit Oracle running on Windows 95 and Windows 98. ORANT is the default Oracle Home directory for 32 bit Oracle on Windows NT. This applies when using SQL*Net v2.x and Net8.   If your Oracle Home directory is something other than ORAWIN, ORAWIN95 or ORANT, look in the ORACLE_HOME\bin directory for ORAnnWIN.DLL's (where nn is the version of Oracle). If any of these DLL's exist, it is a 16 bit installation. Remember that the Oracle client software for NT is a distinct product from the software for Windows 95 and is not interchangeable.   To verify your version of Oracle components, run the Oracle Installer (ORAINST.EXE utility in the ORACLE_HOME\BIN directory). This utility will identify what version of SQL*Net and Net8 is installed.   Determine PowerBuilder Version   Before attempting to connect to Oracle, you must know whether you are running 16 bit or 32 bit PowerBuilder. If you are not sure which version is installed, you can find out by running PowerBuilder and selecting Help and About PowerBuilder.   PowerBuilder 5.x   16 bit PowerBuilder Enterprise will say PowerBuilder Enterprise. 32 bit PowerBuilder Enterprise will say PowerBuilder Enterprise/32.   Note for users of both 16 and 32 bit PowerBuilder 5.x   The 32 bit PowerBuilder installation makes a registry entry in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths for PB050.exe. The Path entry inserted contains the path to the 32 bit PowerBuilder DLL's. When 16 bit PB050.EXE runs, Windows NT or Windows 95 checks to see if there is an entry with a Path (based on the executable name) and finds a match (on the 32 bit entry) and puts the contents of the Path entry from the registry in front of your DOS path. This will not show up when you look at your path from a DOS command prompt but it can affect where PowerBuilder looks for the DLL's to load. One workaround for this problem is to rename the 16 bit PowerBuilder executable to PB050w.exe. Once the executable is renamed you can create a registry entry with a Path variable for the renamed executable.   PowerBuilder 6.x   PowerBuilder 6.x is available in 32 bit only for the development environment so you should see PowerBuilder Enterprise/32 in Help and About. PowerBuilder 6.x also makes a registry entry in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths for PB60.exe. The Path entry inserted contains the path to the 32 bit PowerBuilder DLL's and this path is put in front of the DOS path when you run the executable. You will not see this path from the DOS prompt.   PowerBuilder 7.x   PowerBuilder 7x is available in 32 bit only for the development environment so you should see PowerBuilder Enterprise/32 in Help and About. PowerBuilder 7.x also makes a registry entry in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths for PB70.exe. The Path entry inserted contains the path to the 32 bit PowerBuilder DLL's and this path is put in front of the DOS path when you run the executable. You will not see this path from the DOS prompt.   Supported Oracle ODBC Drivers   SQL*Net 2.x 16 Bit Connections   The 16 bit Oracle ODBC drivers are supported on Windows 3.1 only. Oracle does not support 16 bit ODBC connections on 32 bit platforms. The following table shows the current Oracle ODBC driver versions and the associated driver and SQL*Net versions. Driver Version Driver DLL SQL*Net Version Support File Version Server version 1.11.0.5 SQORA7.DLL 2.0 7.0.x 7.0 or later 1.11.1.5 SQORA71.DLL 2.1 7.1.x 7.1 or later 1.14.1.0 SQORA72.DLL 2.2 7.2.x 7.2 or later 2.5.3.1.0 SQORA73.DLL 2.3 7.3.x 7.3 or above 32 Bit Connections   The following table shows the current Oracle ODBC driver versions and the associated driver and SQL*Net versions. Driver Version Driver DLL SQL*Net Version Support File Version Server version *1.13.5.0.04 SQO32_72.DLL 2.2 7.2.x 7.2 or later 2.5.3.1.0 SQO32_73.DLL 2.3 7.3.x 7.3 or above   * Not supported on WINNT 4.x   Net8 32 Bit Connections   The following table shows the current Oracle ODBC driver version and the associated driver and Net8 version. Driver Version Driver DLL Net8 Version Support File Version Server version *8.0.3.0.0 SQORA32.DLL 8.0.3.0.0 8.0.x 8.0 or later *8.0.4.00 SQORA32.DLL 8.0.4.0.0 8.0.x 8.0 or later 8.0.5.00 SQORA32.DLL 8.0.5.0.0 8.0.x 8.0 or later 8.01.05 SQORA32.DLL 8.1.5.0.0 8.0.x 8.0 or later   * See Common Connect Errors - Catalog tables could not be created and are not available for use. We recommend using the 8.0.5.00 version of the driver.   Configure the ODBC Data Source   You can create a new data source by running the ODBC administrator or by using the ODBC Configuration facility within PowerBuilder. The advantage of using the facility within PowerBuilder is that a Database Connection profile is also created along with the ODBC data source (PB5 and PB6 only).   The Connect String in the data source is the service name as found in your tnsnames.ora file. The DBQ entry in the connect string overrides this value.   Note for Personal Oracle: The connection to Personal Oracle bypasses SQL*Net. The SQL*Net Connect string is "2:<SID>" where <SID> is the instance ID. The default SID is "ORCL".   Refer to the Oracle On-Line help for assistance when setting up the data source.   Verify Your Oracle Connection   PowerBuilder uses the same client and network layer that SQL*Net, Net8 and SQL*Plus use to access your Oracle database. The only difference is that PowerBuilder native connections and ODBC connections use the Oracle Call Interface (OCI) layer. Thus, OCI must be installed when installing SQL*Net or Net8. To use this layer, you must have the appropriate Required Support Files (RSF's) installed.   Connecting to your database from SQL*Plus verifies that your Oracle client software was installed and configured correctly. If there is a problem with the installation or configuration of your Oracle client software, you will not be able to connect using PowerBuilder. If you can connect using SQL*Plus, then attempt to connect with another ODBC tool using the data source you created. Oracle ships an ODBC utility with SQL*Net 2.3.x called Oracle ODBC Test. You can use this utility to test the data source connection. Some other common tools are MS Query and MS test. Connecting with another tool makes sure that ODBC is correctly installed and the data source is configured properly. You should verify your ODBC connection outside of PowerBuilder before calling PowerBuilder Technical support for assistance.   PowerBuilder Transaction Properties DBMS ODBC UserId Not used DBPass Not used Database Not used ServerName Not used. This value will be populated by PowerBuilder in the connection profile after a connection is made. LogID Not used LogPass Not Used DBParm At a minimum, there should be a ConnectString that contains the DSN (Data Source Name). You may also want to include your login ID and/or password. The following example shows the ConnectString for ODBC data source "DS Oracle 73" for user "Scott" with password "tiger": ConnectString='DSN=DS Oracle 73;UID=SCOTT;PWD=TIGER'. For PowerBuilder 5.x, the DBQ value will be inserted in the connect string after you connect for the first time. This overrides the server name in the ODBC data source. PowerBuilder 6.x does not make an entry in the connect string for the DBQ value.   Common Connect Errors   DBMS ODBC not supported in your current installation   ODBC32.DLL not found (Windows 95). For PowerBuilder 5.x PBODB050.DLL not found in path. For PowerBuilder 6.x PBODB60.DLL not found in path. For PowerBuilder 7.x PB0DB70.DLL not found in the path.   IM002 - Data Source name not found and no default driver specified   The data source in the connect string is not valid. Check the spelling and make sure that you are not trying to use a 16 bit data source in 32 bit PowerBuilder or vice versa.   IM003 - Specified driver could not be loaded   The driver specified in the ODBC data source could not be loaded. This happens if the driver was moved or deleted after the data source was created. This error will also occur if the Required Support Files are not installed or are not in the path.   ORA-12154:TNS:could not resolve service name   The tnsnames.ora file was not found in ORACLE_HOME\NETWORK\ADMIN directory. This error also occurs id if the service name (either from the server in the data source or the DBQ value in the connect string) is not found in the tnsnames.ora file. Remember that there should be no "@" or "@tns:" in this value.   File Error - Cannot find ODBC.DLL   ODBC.DLL missing or not in path (16 bit)   Catalog tables could not be created and are not available for use   This message will appear during connect time when using the Oracle 8.0.03 ODBC driver. The behavior has changed from the Oracle ODBC driver v7.x to Oracle ODBC driver v8.0.03. Version 8.0.03 does not return any data in ODBC SQLTables() calls for tables owned by 'SYS' and 'SYSTEM'. This makes it impossible for PowerBuilder to determine whether the catalog tables exist. It also prevents tables owned by 'SYS' or 'SYSTEM' from showing up in a PowerBuilder table list, even if Show System Tables is checked. This problem has been reported to Oracle and the Oracle Product Defect number is 559182 and was fixed in 8.0.3.0.2 version.   In the mean time, you can either ignore this message, or, if you don't use extended attributes, you can turn off the Repository Tables within PowerBuilder. This can be done by clicking the Database Painter and selecting Design, and Options. Uncheck the Use Powersoft Repository option. Reconnect to your database for the change to take effect. 【发表评论】 【加入收藏】 【打印此文】 【关闭窗口】 上一篇:PHP中使用ORACLE函数的使用说明 [2005-12-13] 下一篇:RedHat6.2 + apache1.3.12 + gd1.8.3 + php4.04 + tomcat + sybase11.9.2 + oracle8.1.6 + mysql(转) [2005-12-13] 网友评论 相关搜索 关于我们|网站地图|隐私和安全性|联系我们|在线工具|友情链接|粤ICP备05097432号 &copy;2004-2005 Alixixi Development Team.All rights reserved 保留所有权利。 访问本网站表明您同意信息使用条款。