UniDAC55 usage instructions in DelphiXE7, unidac55delphixe7

Source: Internet
Author: User

UniDAC55 usage instructions in DelphiXE7, unidac55delphixe7

This article has referred to the articles of various great gods. I would like to express my gratitude here. The project requires connecting to the oracle database without installing the oracle client. It also supports 32-bit and 64-bit applications and has been compiled through multiple experiments.

1. Execute \ UniDAC55src \ Source \ Delphi21 \ Make. bat. 2. Go to the directory \ UniDAC55src \ Bin \ Delphi21 \ Win64 \ and $ \ UniDAC55src \ Bin \ Delphi21 \ Win32 \ generate bpl.

2. Put *. bpl under the $ \ UniDAC55src \ Bin \ Delphi21 \ Win32 \ directory
Copy to c: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 15.0 \ Bpl.

3. \ UniDAC55src \ Source and \ UniDAC55src \ Source \ UniProviders \ Oracle directory added to the library Path of delphi,
The operation path is: tools-> options-> environment options-> Delphi options-> library. enter it in the library path.

4. Open Delphi XE7,
Component-> Install Packages
Install c: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 15.0 \ Bpl \ dclunidac210.bpl.

6. Plan the project file path and create pas, dcu, and thirdparty_unidac \ dcu. The project options are as follows:

The 64-bit platform uses the same settings to save the new unit files in the project to the pas directory.

7. Add $ \ UniDAC55src \ Lib \ Delphi21 \ Win32 \ The following dcu for compilation.
Go to the project directory thirdparty_unidac \ dcu,
OraCallUni. dcu
OraClassesUni. dcu
OracleUniProvider. dcu
OraConnectionPoolUni. dcu
OraConnectionStringUni. dcu
OraConstsUni. dcu
OraDataTypeMapUni. dcu
OraDateTimeUni. dcu
OraErrorUni. dcu
OraIntervalUni. dcu
OraNumberUni. dcu
OraObjectsUni. dcu
OraParserUni. dcu
OraScriptProcessorUni. dcu
OraServicesUni. dcu
OraSQLGeneratorUni. dcu

7. Copy a 32-bit program \ UniDAC55src \ Lib \ Delphi21 \ Win32 \ OraNetUni. dcu to the project directory. When a 64-bit program is compiled, copy \ UniDAC55src \ Lib \ Delphi21 \ Win64 \ OraNetUni. dcu to the project directory.
Select different 64-bit target platforms and add commands:
Copy .. \ doc \ oranet \ x64 \ oranetuni. dcu. \ thirdparty_unidac \ dcuoranetuni. dcu to project options-> build events-> pre-build events-> commands

Select a different 32-bit target platform and add the command:
Copy .. \ doc \ oranet \ x86 \ oranetuni. dcu. \ thirdparty_unidac \ dcuoranetuni. dcu
Project options-> build events-> pre-build events-> commands

8. Create a vcl project. Open the window and find UniDAC Providers at the bottom of tool palette,
Add the TOracleUniProvider control, open UniDAC, add TUniconnection, double-click the control to set provider to oracle, and set options-> Direct = true.
Test code:
UniConnection1.SpecificOptions. Values ['onontimeout']: = '3 ';
UniConnection1.server: = '192. 168.37.130: 192: orcl ';
UniConnection1.username: = 'hello ';
UniConnection1.password: = 'hello ';
Try
UniConnection1.Connect;
ShowMessage ('OK ');
Except
On e: exception do
Begin
ShowMessage (e. message );
End;
End;

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.