( ! ) Warning: Creating default object from empty value in /var/www/clients/client1/web1/web/modules/Forums/common.php on line 421
Call Stack
#TimeMemoryFunctionLocation
10.0000358448{main}( ).../modules.php:0
20.0006369392include( '/var/www/clients/client1/web1/web/index.php ).../modules.php:4
30.0318675928include( '/var/www/clients/client1/web1/web/modules/PHP_Manual/index.php ).../index.php:179
40.0322676888include( '/var/www/clients/client1/web1/web/header.php ).../index.php:157
50.0322693488head( ).../header.php:112
60.0322694072online( ).../header.php:39
70.0323694072my_online( ).../mainfile.php:720
80.0323697248include( '/var/www/clients/client1/web1/web/modules/Forums/common.php ).../custom_mainfile.php:1151
Omega13a's Corner - PHP Manual - Reference - Ibm-db2
Omega13a's Corner
Contribute To This Site
Submit a Download
Submit a Link
Submit A Review for Omega13a's Corner

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using
  Login or Register
::  Home   ::  Your Account   ::  Forums   ::  UFT Encyclopedia   ::  UFT Writer  ::
2020.81
Omega13a's Wish List
My Amazon.com Wish List
 
Affiliates
Supported by

[ Be A Supporter ]
[ NukeSupporters( tm) ]
 
Navigation
· Hom e
· Rep ort An Error

Omega13a's Corner

· Ome ga13a's Corner Index
· Ana grams
· Ana grams
· Aut ograms
· Aut ograms
· Bum per Stickers
· Bum per Stickers
· Cow Analogies
· Cow Analogies
· Cru el Baby Names
· Cru el Baby Names
· DHT ML Tricks
· DHT ML Tricks
· Dum b Criminals
· Dum b Criminals
· Dum b Headlines
· Dum b Headlines
· Dum b Laws
· Dum b Laws
· Dum b Questions
· Dum b Questions
· Dum b Quotes
· Dum b Quotes
· Dum b Signs
· Dum b Signs
· Dum b Warning Labels
· Dum b Warning Labels
· Eye witness Reports
· Eye witness Reports
· Fea rs
· Fea rs
· Gam es
· Gam es
· Goo gle Searches
· Goo gle Searches
· Gra phing Calculator
· Gra phing Calculator
· Hor oscope
· Hor oscope
· hta ccess Tutorials
· hta ccess Tutorials
· HTM L Manual
· HTM L Manual
· IP Lookup
· IP Lookup
· Jok es
· Jok es
· Mis c Funny Stuff
· Mis c Funny Stuff
· Odd Books
· Odd Books
· Odd Place Names
· Odd Place Names
· Odd Product Names
· Odd Product Names
· Our Solar System
· Our Solar System
· Pal indromes
· Pal indromes
· Pan grams
· Pan grams
· PEA R Manual
· PEA R Manual
· PHP Manual
· PHP Manual
· PHP Nuke Tools
· PHP Nuke Tools
· Poi ntless Quizzes
· Poi ntless Quizzes
· Pri me Numbers
· Pri me Numbers
· Ran dom Quotes
· Ran dom Quotes
· Ran t
· Ran t
· Rev iews
· Rev iews
· Rhy ming Pairs
· Rhy ming Pairs
· Sci -Fi/Fantasy Encyclopedia
· Sci -Fi/Fantasy Encyclopedia
· Wea ther
· Wea ther
· Wei rd Ads
· Wei rd Ads
· Wei rd Wide Web
· Wei rd Wide Web
· Zen Sarcasms
· Zen Sarcasms

Star Trek

·&nbs pBorg Species Designations
· Bor g Species Designations
· FAQ
· FAQ
· Sev Trek
· Sev Trek
· Sta r Trek Alien Sayings
· Sta r Trek Alien Sayings
· Sta r Trek Eggs
· Sta r Trek Eggs
· Sta r Trek Encyclopedia
· Sta r Trek Encyclopedia
· Sta r Trek Episode Guides
· Sta r Trek Episode Guides
· Sta r Trek Goofs
· Sta r Trek Goofs
· Sta r Trek Mysteries
· Sta r Trek Mysteries
· Sta r Trek Reviews
· Sta r Trek Reviews
· Sta r Trek Timeline
· Sta r Trek Timeline
· Tre k Today Headlines
· Tre k Today Headlines
· Wor lds in Star Trek
· Wor lds in Star Trek

Community

· Cha t Bot
· Cha t Bot
· Cha t Room
· Cha t Room
· Fee dback
· Fee dback
· For ums
· For ums
· Gue stbook
· Gue stbook
· Joi n a Webring
· Joi n a Webring
· Joi n the Staff
· Joi n the Staff
· Mem bers List
· Mem bers List
· Pri vate Messages
· Pri vate Messages
· Rec ommend Us
· Rec ommend Us
· Rul es/Terms of Use
· Rul es/Terms of Use
· Sur veys
· Sur veys
· Use r Journals
· Use r Journals
· Vot e For Us
· Vot e For Us
· Win An Award
· Win An Award
· You r Account
· You r Account

Media/Arts

· Dow nloads
· Dow nloads
· Fan Fictions
· Fan Fictions
· Han gman
· Han gman
· Ima ge Gallery
· Ima ge Gallery
· Tec hnobable Generator
· Tec hnobable Generator

Staff Personal Sections

· Lad y Lursa's Reading Corner

Links and Webrings

· Ban ner Exchanges
· Ban ner Exchanges
· Joi n Banner Exchange
· Joi n Banner Exchange
· Lin king To Us
· Lin king To Us
· Top sites
· Top sites
· Web Links
· Web Links
· Web rings
· Web rings

Site Info

· Abo ut the Owner
· Abo ut the Site
· Abo ut the Site
· Abo ut UFT_PHP
· Abo ut UFT_PHP
· Abo ut You
· Awa rds
· Awa rds
· Ban ned Stuff
· Ban ned Stuff
· Cop yright
· Cop yright
· Leg al Information
· Leg al Information
· Mod ifications Installed
· Mod ifications Installed
· Sea rch Results
· Sea rch Results
 
UFT Community

Omega13a's Corner Forums

 
Vote For Us
 
Ads


IBM DB2, Cloudscape and Apache Derby Functions

LVIII. IBM DB2, Cloudscape and Apache Derby Functions

Introduction

These functions enable you to access IBM DB2 Universal Database, IBM Cloudscape, and Apache Derby databases using the DB2 Call Level Interface (DB2 CLI).

Requirements

To connect to IBM DB2 Universal Database for Linux, UNIX, and Windows, or IBM Cloudscape, or Apache Derby, you must install an IBM DB2 Universal Database client on the same computer on which you are running PHP. The extension has been developed and tested with DB2 Version 8.2.

To connect to IBM DB2 Universal Database for z/OS or iSeries, you also require IBM DB2 Connect or the equivalent DRDA gateway software.

Requirements on Linux or Unix

The user invoking the PHP executable or SAPI must specify the DB2 instance before accessing these functions. You can set the name of the DB2 instance in php.ini using the ibm_db2.instance_name configuration option, or you can source the DB2 instance profile before invoking the PHP executable.

If you created a DB2 instance named db2inst1 in /home/db2inst1/, for example, you can add the following line to php.ini:
ibm_db2.instance_name=db2inst1
If you do not set this option in php.ini, you must issue the following command to modify your environment variables to enable access to DB2:
bash$ source /home/db2inst1/sqllib/db2profile
To enable your PHP_enabled Web server to access these functions, you must either set the ibm_db2.instance_name configuration option in php.ini, or source the DB2 instance environment in your Web server start script (typically /etc/init.d/httpd or /etc/init.d/apache).

Installation

To build the ibm_db2 extension, the DB2 application development header files and libraries must be installed on your system. DB2 does not install these by default, so you may have to return to your DB2 installer and add this option. The header files are included with the DB2 Application Development Client freely available for download from the IBM DB2 Universal Database support site.

If you add the DB2 application development header files and libraries to a Linux or Unix operating system on which DB2 was already installed, you must issue the command db2iupdt -e to update the symbolic links to the header files and libraries in your DB2 instances.

ibm_db2 is a PECL extension, so follow the instructions in Chapter 7 to install the ibm_db2 extension for PHP. Issue the configure command to point to the location of your DB2 header files and libraries as follows:
bash$ configure --with_IBM_DB2=/path/to/DB2
The configure command defaults to /opt/IBM/db2/V8.1.

Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

Table 1. ibm_db2 Configure Options

NameDefaultChangeableChangelog
ibm_db2.binmode"1"PHP_INI_ALL 
ibm_db2.i5_allow_commit"0"PHP_INI_SYSTEM 
ibm_db2.i5_dbcs_alloc"0"PHP_INI_SYSTEM 
ibm_db2.instance_nameNULLPHP_INI_SYSTEM 

Here's a short explanation of the configuration directives.

ibm_db2.binmode integer

This option controls the mode used for converting to and from binary data in the PHP application.

  • 1 (DB2_BINARY)

  • 2 (DB2_CONVERT)

  • 3 (DB2_PASSTHRU)

ibm_db2.i5_allow_commit integer

This option controls the commit mode used for i5 schema collections in the PHP application.

  • 0 no commit (see i5_commit for override)

  • 1 allow commit (see i5_commit for override)

ibm_db2.i5_dbcs_alloc integer

This option controls the internal ibm_db2 allocation scheme for large DBCS column buffers.

  • 0 no expanded allocations (see i5_dbcs_alloc for override)

  • 1 use expanded allocations (see i5_dbcs_alloc for override)

ibm_db2.instance_name string

On Linux and UNIX operating systems, this option defines the name of the instance to use for cataloged database connections. If this option is set, its value overrides the DB2INSTANCE environment variable setting.

This option is ignored on Windows operating systems.

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

DB2_BINARY (integer)

Specifies that binary data shall be returned as is. This is the default mode.

DB2_CONVERT (integer)

Specifies that binary data shall be converted to a hexadecimal encoding and returned as an ASCII string.

DB2_PASSTHRU (integer)

Specifies that binary data shall be converted to a NULL value.

DB2_SCROLLABLE (integer)

Specifies a scrollable cursor for a statement resource. This mode enables random access to rows in a result set, but currently is supported only by IBM DB2 Universal Database.

DB2_FORWARD_ONLY (integer)

Specifies a forward_only cursor for a statement resource. This is the default cursor type and is supported on all database servers.

DB2_PARAM_IN (integer)

Specifies the PHP variable should be bound as an IN parameter for a stored procedure.

DB2_PARAM_OUT (integer)

Specifies the PHP variable should be bound as an OUT parameter for a stored procedure.

DB2_PARAM_INOUT (integer)

Specifies the PHP variable should be bound as an INOUT parameter for a stored procedure.

DB2_PARAM_FILE (integer)

Specifies that the column should be bound directly to a file for input.

DB2_AUTOCOMMIT_ON (integer)

Specifies that autocommit should be turned on.

DB2_AUTOCOMMIT_OFF (integer)

Specifies that autocommit should be turned off.

DB2_DOUBLE (integer)

Specifies that the variable should be bound as a DOUBLE, FLOAT, or REAL data type.

DB2_LONG (integer)

Specifies that the variable should be bound as a SMALLINT, INTEGER, or BIGINT data type.

DB2_CHAR (integer)

Specifies that the variable should be bound as a CHAR or VARCHAR data type.

DB2_CASE_NATURAL (integer)

Specifies that column names will be returned in their natural case.

DB2_CASE_LOWER (integer)

Specifies that column names will be returned in lower case.

DB2_CASE_UPPER (integer)

Specifies that column names will be returned in upper case.

Resource Types

The ibm_db2 extension returns connection resources, statement resources, and result set resources.

Table of Contents
db2_autocommit --  Returns or sets the AUTOCOMMIT state for a database connection
db2_bind_param --  Binds a PHP variable to an SQL statement parameter
db2_client_info -- Returns an object with properties that describe the DB2 database client
db2_close --  Closes a database connection
db2_column_privileges --  Returns a result set listing the columns and associated privileges for a table
db2_columns --  Returns a result set listing the columns and associated metadata for a table
db2_commit --  Commits a transaction
db2_conn_error --  Returns a string containing the SQLSTATE returned by the last connection attempt
db2_conn_errormsg --  Returns the last connection error message and SQLCODE value
db2_connect --  Returns a connection to a database
db2_cursor_type --  Returns the cursor type used by a statement resource
db2_exec --  Executes an SQL statement directly
db2_execute --  Executes a prepared SQL statement
db2_fetch_array --  Returns an array, indexed by column position, representing a row in a result set
db2_fetch_assoc --  Returns an array, indexed by column name, representing a row in a result set
db2_fetch_both --  Returns an array, indexed by both column name and position, representing a row in a result set
db2_fetch_object --  Returns an object with properties representing columns in the fetched row
db2_fetch_row --  Sets the result set pointer to the next row or requested row
db2_field_display_size --  Returns the maximum number of bytes required to display a column
db2_field_name --  Returns the name of the column in the result set
db2_field_num --  Returns the position of the named column in a result set
db2_field_precision --  Returns the precision of the indicated column in a result set
db2_field_scale --  Returns the scale of the indicated column in a result set
db2_field_type --  Returns the data type of the indicated column in a result set
db2_field_width --  Returns the width of the current value of the indicated column in a result set
db2_foreign_keys --  Returns a result set listing the foreign keys for a table
db2_free_result --  Frees resources associated with a result set
db2_free_stmt --  Frees resources associated with the indicated statement resource
db2_next_result --  Requests the next result set from a stored procedure
db2_num_fields --  Returns the number of fields contained in a result set
db2_num_rows --  Returns the number of rows affected by an SQL statement
db2_pconnect --  Returns a persistent connection to a database
db2_prepare --  Prepares an SQL statement to be executed
db2_primary_keys --  Returns a result set listing primary keys for a table
db2_procedure_columns --  Returns a result set listing stored procedure parameters
db2_procedures --  Returns a result set listing the stored procedures registered in a database
db2_result --  Returns a single column from a row in the result set
db2_rollback --  Rolls back a transaction
db2_server_info -- Returns an object with properties that describe the DB2 database server
db2_set_option -- Set options for connection or statement resources
db2_special_columns --  Returns a result set listing the unique row identifier columns for a table
db2_statistics --  Returns a result set listing the index and statistics for a table
db2_stmt_error --  Returns a string containing the SQLSTATE returned by an SQL statement
db2_stmt_errormsg --  Returns a string containing the last SQL statement error message
db2_table_privileges --  Returns a result set listing the tables and associated privileges in a database
db2_tables --  Returns a result set listing the tables and associated metadata in a database

Total Hits: 0

Powered by PHPNukePage Protected By Copyscape. Do Not CopyNukeSentinel ProtectedPowered by PEARPowered by PECL

© 2000, 2001, 2002 Trek Archive, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 United Federation of Trek.
Omega's Corner is © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 omega13a.
Star Trek®, Star Trek: The Next Generation®, Star Trek: Deep Space Nine®, Star Trek: Voyager®, Enterprise®, and Star Trek: Enterprise® are registered trademarks of Paramount Pictures and Viacom. All Star Trek material found on this site is for promotional purposes only, and not personal or financial gain. No infringements on their copyrights is intended.
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.


ROR Sitemap Google Sitemap

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.3732 Seconds
Server Load: 9.90
Queries: 24 (0.0039 seconds)
Included 92 files
242 classes defined
46 interfaces defined
0 classes loaded using __autoload()
2,724 functions defined
4,460 constants defined

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using

UFT's Webring of Sci-Fi and Fantasy
UFT's Webring of Sci-Fi and Fantasy
Previous site : Random : Next site : List sites
Powered by PHP-Ring
Psychology News
Scitrek webring
Scitrek webring
Previous site : Random : Next site : List sites
Powered by .PHP-Ring
Psychology News
robots.txt
Contributors Contact Us