Powerbuilder9 connect to Oracle 10g

Source: Internet
Author: User
To put it simply:

1. Find the OCI. dll and oraociei10.dll tnsnames. ora files (available on the Oracle client) and put them in your application.ProgramDirectory.

2. You must have a tnsnames. ora file which can be opened and edited in notepad.

3. If you are prompted that the OCI. dll file cannot be loaded, it indicates that your computer system is old and does not have the msvcr71.dll file. It is also stored in your program directory or in the system file directory.

4. If Chinese characters in the table are garbled characters (Chinese characters show '??? '), You just need to register a value in the registry of your system.

 

For details, see the following:

 

 

Note: the release of the Oracle10g installation-free client may be very different from that of the previous version, because I have not studied the release of the previous version of Oracle9i, so I am not afraid to comment here. However, the release of Oracle10g is indeed very simple. During this database migration, I consulted Oracle technical staff and found that their technical staff were not very proficient in the solution, it only informs that the 10g dynamic library connection will be applicable to all lower versions, and the release is very simple. However, the detailed configuration is also specific to Alibaba Cloud. Now, let's talk about the release method in detail.
1. files to be released:
1. dll file;
(1) OCI. dll
(2) oraociei10.dll
The above two DLL files are obtained directly in the installation directory after the Oracle client instantclient is installed. oraociei10 is about 88 MB, and there is no way to get this large. (This file can be found in the Oracle Installation Directory of the database server. If you do not know whether it is the bin directory, search for it yourself .)
(3) libjcc. dll
(4) pbdwe90.dll
(5) pbo9090.dll
(6) pbvm90.dll
(7) msvcr71.dll (This dll is required for the Win2000 operating system and is not required for the WINXP version. For details, go to the System32 directory of the WINXP operating system)
The above DLL is the minimum DLL required for Pb release. You can add the DLL as required by the project. The number 9 is a PB version, which can be adjusted according to your own development version. Note the msvcr71.dll file, which is required for Win2000 operating system release and not for WINXP. However, we recommend that you add them together. In this way, versions are not differentiated.
2. Other Related Documents
(1) tnsnames. ora
This file records the address and Database Name of the Client Connecting to the database server;
Note: All the above files can be copied to the installation directory at the time of release. Of course, you can copy them to the operating system directory. Some may be confused about how to modify the server address and database name in the tnsnames. ora file, because this file does not support the INI read/write format. I used the filewrite FUNCTION IN THE Pb script to hard write all strings.
3. Registry
(1) Add the [HKEY_LOCAL_MACHINE/software/Oracle] Directory;
(2) create a string value in this directory:
Nls_lang = simplified chinese_china.zhs16gbk
This is to display the settings of Simplified Chinese. Garbled characters are displayed if Chinese characters are not set;
If you want to display traditional Chinese characters:
Nls_lang = Traditional chinese_taiwan.zht16mswin950
Note: in fact, the registry can be connected to the database without any settings. The Registry settings are language settings.
3. Run the test
According to the above configuration method, both Win2000 Professional Edition and WINXP Professional Edition passed the test. For 10 Gbit/s, there are a lot fewer DLL than the previous versions, which may be the reason why the oraociei10.dll file is so large, maybe Oracle has integrated all the previous related DLL files into this file. Here is a simple test. I don't know if there will be any new problems. You are welcome to perform further tests to see if some dll may be missing and some functions may cause problems.

Supplement: The following is a 10G connection of Pb direct connection.Code
Sqlca. DBMS = "o90 Oracle9i (9.0.1)" // This DBMS uses the 9 version, but the 10 version is also available.
Sqlca. logpass = '******'
Sqlca. servername = "yoursername" // This is the connection string name in the tnsnames. ora File
Wf_oracleini (ls_servername, ls_dbname) // This function is used to set the Server IP address and database name in tnsnames. ora of oracle.
Sqlca. logid = 'youruname'
Sqlca. autocommit = false // Oracle seems to have to be an explicit transaction by default. It doesn't matter if this parameter is set.
Sqlca. dbparm =''

Connect using sqlca; // or your own database connection object name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.