mod_perl
7-18
Oracle HTTP Server Administrator’s Guide
This release of
DBD::Oracle
supports
SQL NCHAR
datatypes and provides driver
extension functions to specify the character form for data binding. The following
script shows an example to access
SQL NCHAR
data:
Example 7–3
Sample Script to Access SQLNCHAR Data
# declare to use the constants for character forms
use DBD::Oracle qw(:ora_forms);
# connect to the database and get the database handle
$dbh = DBI->connect( ... );
# prepare the statement and get the statement handle
$sth = $dbh->prepare( 'SELECT * FROM TABLE_N WHERE NCOL1 = :nchar1' );
# bind the parameter of a NCHAR type
$sth->bind_param( ':nchar1', $param_1 );
# set the character form to NCHAR
$sth->func( { ':nchar1' => ORA_NCHAR } , 'set_form' );
$sth->execute;
As shown in
Example 7–3
, the
set_form
function is provided as a private function
that you can invoke with the standard DBI
func()
method. It takes an anonymous
hash that specifies which placeholder should be associated with which character
form. The valid values of character form are either
ORA_IMPLICIT
or
ORA_NCHAR
.
Setting the character form to
ORA_IMPLICIT
causes the application's bound data to
be converted to the database character set, and
ORA_NCHAR
to the national character
set. The default form is
ORA_IMPLICIT
.
Another function is provided to specify the default character set form as follows:
# specify the default form to be NCHAR
$dbh->func( ORA_NCHAR, 'set_default_form' );
After this call is made, the form of all parameters is
ORA_NCHAR
, unless otherwise
specified with
set_form
calls. Note that unlike the
set_form
function, this is a
function on the database handle, so every statement from the database handle with
its default form specified has the form of your choice by default.
Содержание HTTP Server
Страница 1: ...Oracle HTTP Server Administrator s Guide 10g Release 1 10 1 Part No B12255 01 December 2003 ...
Страница 12: ...xii ...
Страница 22: ...xxii ...
Страница 30: ...Starting Stopping and Restarting Oracle HTTP Server 1 8 Oracle HTTP Server Administrator s Guide ...
Страница 38: ...About htaccess Files 2 8 Oracle HTTP Server Administrator s Guide ...
Страница 52: ...Getting Information about Processes 4 8 Oracle HTTP Server Administrator s Guide ...
Страница 60: ...Configuring Reverse Proxies and Load Balancers 5 8 Oracle HTTP Server Administrator s Guide ...
Страница 70: ...Specifying Log Files 6 10 Oracle HTTP Server Administrator s Guide ...
Страница 164: ...Security Services Implemented Within Oracle HTTP Server 8 34 Oracle HTTP Server Administrator s Guide ...
Страница 170: ...9 6 Oracle HTTP Server Administrator s Guide ...
Страница 178: ...opmn xml A 8 Oracle HTTP Server Administrator s Guide ...
Страница 211: ...Glossary 9 X 509 Public keys can be formed in various data formats The X 509 v3 format is one such popular format ...
Страница 212: ...Glossary 10 ...
Страница 224: ...Index 12 ...