
NextHP JDBC Driver for SQL/MP API andReferenceDocumentation on both NTL and the product CD:HP JDBC Driver for SQL/MP Programmer's Reference❍ HP
JDBC/MP Docs Home Page | Contents| Prev | Next | Index | Glossary About This DocumentThis section explains these subjects:New and Changed Information●
setMaxIdleTimepublic void setMaxIdleTime(int maxIdleTime)The number of seconds that a physical connection should remain idle in the pool before the co
the interval in seconds that the pool should wait before enforcing the current policy defined by thevalues of the connection pool properties.See Also:
setDataSourceNamepublic void setDataSourceName(String dataSourceName)Sets the name of an underlying data source.Parameters:dataSourceName - - the name
getReferencepublic javax.naming.Reference getReference() throws javax.naming.NamingExceptionReturns a javax.naming.
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Uses of Classcom.tandem.sqlmp.SQLMPConnectionPoolDataSourc
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAI
StringgetDescription() Returns the description of this DataSource object ifone was set. StringgetJdbcPropfile() Returns the name of
voidsetMaxPoolSize(int maxPoolSize) Sets the maximum number of physical connections thatthe pool (free and inuse pool) should contain. voids
Returns:a Connection to the database.Throws:java.sql.SQLException - if a database-access error occurs.getConnectionpublic java.sql.Connection getConne
setLogWriterpublic void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLExceptionSets the log writer for this data source.Th
Document StructureThis document is a set of linked HTML files (Web pages). Each file corresponds to one of the sections listed anddescribed in this ta
Returns:the data source login time limit; this value is ignored.Throws:java.sql.SQLException - if a database access error occurs.getDescriptionpublic
mode - - a String containing either "INTERNAL" or "EXTERNAL".Throws:java.sql.SQLException - if setTransactionMode is called aftert
setMaxStatementspublic void setMaxStatements(int max) throws java.sql.SQLExceptionSets the total number of statements that can be
getMaxPoolSizepublic int getMaxPoolSize()Returns the maximum number of physical connections the pool (freeand inuse) should contain. A value of zero (
the number of physical connections the pool should maintain inthe free pool.See Also:setMinPoolSize(int), setMaxPoolSize(int)setPoolLoggingpublic void
PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Uses of Classcom.tandem.sqlmp.SQLMPDataSourceNo usage of c
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Deprecated APIPackage Class Use Tree Next Index Help H
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Serialized FormClasscom.tandem.sqlmp.SQLMPConnectionPoolDat
maxPoolSize_int maxPoolSize_maxIdleTime_int maxIdleTime_minPoolSize_int minPoolSize_propertyCycleInterval_int propertyCycleInterval_description_String
Related ReadingFor background information about the features described in this guide, see these documents:HP NonStop JDBC/MP Driver API and Reference
userName_String userName_password_String password_url_String url_props_java.util.Properties props_needSetUp_boolean needSetUp_propfileName_String prop
logWriter_java.io.PrintWriter logWriter_loginTimeout_int loginTimeout_description_String description_transactionMode_String transactionMode_dataSource
pool_com.tandem.sqlmp.SQLMPPool pool_maxPoolSize_int maxPoolSize_minPoolSize_int minPoolSize_needSetUp_boolean needSetUp_propfileName_String propfileN
catalogName_String catalogName_log_boolean log_driver_com.tandem.sqlmp.SQLMPDriver driver_Package Class Use Tree Next Index Help HP JDBC Driver
Package Class Use Tree Deprecated Index Help HP JDBC Driver for SQL/MP PREV NEXT C G SCcom.tandem.sqlmp - package com.tandem.sqlmp Gg
Retrieves the maximum time in seconds that this ConnectionPoolDataSourceobject will wait while attempting to connect to a database.getLogWriter() - Me
getReference() - Method in class com.tandem.sqlmp.SQLMPConnectionPoolDataSourceReturns a javax.naming.Reference to this DataSource object.getTransacti
wait while attempting to connect to a database.setLogWriter(PrintWriter) - Method in class com.tandem.sqlmp.SQLMPDataSourceSets the log writer for thi
Sets the TransactionMode property.setTransactionMode(String) - Method in classcom.tandem.sqlmp.SQLMPConnectionPoolDataSourceSets the TransactionMode p
(ODBC) product to access SQL/MP databases. If the NonStop ODBC server is installed on a NonStop server,and an ODBC driver is installed on a client, th
Introduces the concepts of transaction processing and the features of the HP NonStop TransactionManagement Facility (TMF) product.TMF Application Prog
Brackets enclose optional syntax items. For example:jdb [options]A group of items enclosed in brackets is a list from which you can choose one item or
COBOL. Common Business-Oriented LanguageCPU. central processing unitDCL. Data Control LanguageDDL. Data Definition LanguageDML. Data Manipulation Lang
HP JDBC Driver for SQL/MP Programmer's Reference (527401-003)Copyright © 2005, Hewlett-Packard Development Company L.P. All rights reserved.
JDBC/MP Docs Home Page | Contents | Prev | Next | Index | GlossaryIntroduction to JDBC/MP DriverThe HP JDBC Driver for SQL/MP (JDBC/MP) implements th
1 JDBC-to-ODBC bridge Possibly Uses a JDBC-to-ODBC bridge totranslate JDBC calls to ODBC calls,which are handled by an ODBC driver.This requires an OD
JDBC/MP Doc Home Page | NextHP JDBC Driver for SQL/MPProgrammer's ReferenceAbstractThis document describes how to use the JDBC Driver for SQL/MP
Simplifies the deployment of applications● Can provide performance advantages● This figure illustrates a three-tier architecture for database acce
LimitationIn TNS/E, applications cannot have their own embedded SQL code. An application using theJDBC/MP driver cannot have any other object with emb
JDBC/MP Docs Home Page | Contents | Prev | Next | Index | GlossaryInstalling and Verifying JDBC/MPThis section explains these subjects:JDBC/MP Driver
HP JDBC Driver for SQL/MP Programmer's Reference (527401-003)Copyright © 2005, Hewlett-Packard Development Company L.P. All rights reserved.
Java Docs Home Page | Contents | Prev | Next | Index | GlossaryAccessing SQL Databases with SQL/MPJava programs interact with NonStop SQL databases u
primary key (empnum) ) organization key sequenced");and you want to insert a new foo row and to set deptnum to null (which is permissible beca
JDBC DriverManagerThe JDBC DriverManager maintains a list of available JDBC drivers. When a program calls the getConnectionmethod, the JDBC DriverMana
Specifying the JDBC Driver Class on the java CommandLineTo specify the JDBC driver class on the java command line, use the -Djdbc.drivers option. For
Connecting a Program to a DatabaseAfter a driver is loaded, you can use it to connect your Java program to a database by passing the URL of the databa
// Retrieve successive rows from the result set and// print the first column of each row, which is a String:while (r.next()) System.out.println
527401-002JDBC Driver for SQL/MP(JDBC/MP) V30July 2004527401-003JDBC Driver for SQL/MP(JDBC/MP) V30 and H10May 2005Document DisclaimerInformation cont
Timestampn n n n n n n n n n n n R RAsciiStreamn n n n n n s n R R n n n nUnicodeStreamn n n n n n n n n n n n n nBinaryStreamn n n n n n n n n n n n
When You Can Use AliasesYou can use aliases for these SQL/MP database objects:Catalogs● Collations● Tables (including table qualifiers for columns
Specifying Properties in a Properties FileThis program has the same effect as the preceding program, except that the properties are in the filejdbc-pr
CONTROL TABLE❍ LOCK TABLE❍ UNLOCK TABLE❍ In the Data Definition Language (DDL):ALTER CATALOG❍ ALTER COLLATION❍ ALTER INDEX❍ ALTER PROGRAM❍
Note: Mapping parts to a fully qualified Guardian name (such as $sys1.vol.subvol.parts)results in an invalid SQL statement because the substitution pr
maxStatements int 0The maximum number ofPreparedStatement objectsthat the pool should cache. Avalue of 0 (zero) disablesstatement pooling.minPoolSize
Context ctx = new InitialContext();ctx.bind("jdbc/pool/bookserver_pool", cpds);After this step is complete, the SQLMPConnectionPoolDataSourc
maxStatements● maxPoolSize● minPoolSize● poolLogging● TransactionMode● jdbcPropfile● Note: The properties defined for the SQLMPDataSource
in the pool. The pool also writes a message whenever the statement pool is full and a PreparedStatement isrequested that is not in the free pool. In t
certain conditions are met. Some of these conditions are:A run-time version of a table has a different redefinition timestamp than the compile-time ve
documentation and the OSF software to which it relates are derived in partfrom materials supplied by these:© 1987, 1988, 1989 Carnegie-Mellon Universi
maxPoolSize PropertySets the maximum number of physical connections that the pool can contain. These connections include those in both thefree pool an
TroubleshootingThis subsection explains these subjects:Tracing● No suitable driver error● Data truncation● Dangling statements● TracingThrough
try { stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("drop table usertable");}catch (SQLException sqlex) {
System.out.println("Col1 = " + res.getInt(1)); System.out.println("Col2 = " + res.getString(2));
JDBC/MP Docs Home Page | Contents | Prev | Next | Index | GlossaryJDBC/MP ComplianceThe JDBC Driver for SQL/MP (JDBC/MP driver) conforms where applic
CallableStatement.registerOutParameter(intparameterIndex, int scale)CallableStatement.wasNull()Connection.createStatement(intresultSetType, int result
Statement.execute(String sql, intautoGeneratedKeys)Statement.execute(String sql, int[]columnIndexes)Statement.execute(String sql,String[] columnNames)
All other areas of the JDBC Driver for SQL/MP are compliant with the JDBC specifications, including such optional featuresas BLOBs, CLOBs, and DataSou
java.sql.DatabaseMetaData.getColumns(Stringcatalog, String schemaPattern, StringtableNamePattern, String columnNamePattern)These columns are added, bu
Creating a BLOBA client JDBC application that needs to store a BLOB in an SQL/MP database table or retrieve a BLOB from an SQL/MPdatabase table provid
AND IS SUBJECT TO CHANGE WITHOUT NOTICE. THE PRODUCT WARRANTIESARE SET FORTH IN THE EXPRESS LIMITED WARRANTY STATEMENTSACCOMPANYING SUCH PRODUCTS. NOT
Example Using BlobInfo Properties and the BlobMapFile PropertyThis example illustrates how to create BlobInfo properties. Two BlobInfo properties are
public void setObject(int parameterIndex, Object x)where:parameterIndexis the parameter to be set.xis any serializable Java object.targetSqlTypeshould
columnNameis the name of the BLOB column.columnIndexis the index of the BLOB column.Errors encountered during the retrieval of a BLOB from its BLOB fi
utility to remove any obsolete BLOB files that have been created for the application from the file system. To maintain theintegrity of the application
All these data source properties are of type String, and all are optional except the Description property, which isrequired to provide a description o
Copyright © 2005, Hewlett-Packard Development Company L.P. All rights reserved.
Java Docs Home Page | Contents | Prev | Next | Index | GlossaryJDBC Trace FacilityThe JDBC trace facility is designed to trace the entry point of all
DriverManager.setLogWriter(new PrintWriter(newFileWriter("FileName")));Tracing Using the DataSourceImplementationThis is preferred way to es
Tracing Using a Wrapper Data SourceEnable tracing by creating a wrapper data source around the data source to be traced. Thewrapper data source contai
HP JDBC Driver for SQL/MP Programmer's Reference (527401-003)Copyright © 2005, Hewlett-Packard Development Company L.P. All rights reserved.
JDBC/MP Doc Home Page | NextJDBC Driver for SQL/MPProgrammer's ReferenceContentsAbout This DocumentNew and Changed Information❍ Is This Documen
JDBC/MP Docs Home Page | Contents | Prev | Next | IndexGlossaryA B C D E F G H I J L N O P R S T U V WAabstract classIn Java, a class designed only as
autocommit modeA mode in which a JDBC driver automatically commits a transaction without theprogrammer's calling commit().BBLOBA data type used t
perform other portions of the program logic. Also called a requester.commandThe operation demanded by an operator or program; a demand for action by,
DriverManagerThe JDBC class that manages drivers.EexceptionAn event during program execution that prevents the program from continuing normally;genera
the HP Tandem Advanced Command Language (TACL) or another HP product'scommand interpreter. Compare to OSS.HHP JDBC Driver for SQL/MP (JDBC/MP)The
The client-server Transmission Control Protocol/Internet Protocol (TCP/IP) used on theWorld Wide Web for the exchange of HTML documents.IIECSee Intern
Guardian environment.interpreterThe component of the Java VM that interprets bytecode into native machine code.ISOSee International Organization for S
Invocation API that invokes Java VM from a C program.Java Run-timeThe Java VM and the Core API. This is the standard Java environment that the Javacom
A data communications network that is geographically limited (typically to a radius of 1kilometer), allowing easy interconnection of terminals, microp
persistenceA property of a programming language where created objects and variables continue toexist and retain their values between runs of the progr
Accessing SQL Databases with SQL/MPSetting a Column in an SQL Table to Null❍ Transactions and the JDBC Driver for SQL/MPAutocommit Mode and the Stan
serverOne of these:An implementation of a system used as a stand-alone system or as a node in anExpand network.❍ The hardware component of a compute
A local procedure in a remote procedure call (RPC). A client calls the stub toperform a task, not necessarily aware that the RPC is involved. The stub
UUnicodeA character-coding scheme designed to be an extension of ASCII. By using 16 bits foreach character (rather than ASCII's 7), Unicode can r
JDBC/MP Docs Home Page | Contents | Index | Prev | NextHP JDBC Driver for SQL/MP Programmer's Reference (527401-003)Copyright © 2005, Hewlett-Pac
JDBC/MP Docs Home Page | Contents | Glossary | Prev | NextIndexA B C D E F G H I J K L M N O P Q R S T U V
writing to a database writing to a database, exampleCcatalogs See database objectsCLOB (Character Large Object)columns, setting to nullco
aliases, which SQL statements support names for setting columns to nulldatabases, connecting to example, standard driver example,
extensions, HPFfiles, properties offloating point supportGgetConnection methodHHP extensionsIIEEE floating pointindexes See database objectsimplem
BLOBs and CLOBs See also BLOB (Binary Large Object) call exception summary metadata result sets standard extensionsJDBC/M
Nname service, registering withNo suitable driver errornonautocommit mode, SQL/MP standard driver, autocommit mode standard driver transac
SQLMPConnectionPoolDataSourceStatement Pooling❍ JDBC/MP Connection-Pooling and Statement-Pooling PropertiesmaxStatements Property minPoolSize Pro
result sets, JDBC 2.0Ssample programs SQL/MP, connecting and using SQL/MP programSQL/MP, accessing databasessqlmp driversqlmptxstandard extens
tracingtruncation of dataUupdates, batchVverifying driver installationA B C D E F G H I J K L M N O P Q R S
Java Docs Home Page | Contents | Index | Glossary | Prev | NextList of ExamplesSection Title Example Title(s)Accessing SQLDatabases withSQL/MPStandard
Java Docs Home Page | Contents | Index | Glossary | Prev | NextList of FiguresSection Title Figure Title(s)Introduction to JDBC/MP Architecture of the
Java Docs Home Page | Contents | Index | Glossary | Prev | Next List of TablesSection Title Table Title(s)About This Manual Document Sections● Intr
Package Class Use Tree Index Help HP JDBC Driver for SQL/MP PREV NEXT How This API Document Is OrganizedThis API (Application Progra
established by the programmer.UseEach documented package, class and interface has its own Use page. This pagedescribes what packages, classes, methods
Frames/No FramesThese links show and hide the HTML frames. All pages are available with or without frames.Serialized FormEach serializable or external
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Hierarchy For All PackagesPackage Hierarchies:com.tandem.s
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Hierarchy For Package com.tandem.sqlmpClass Hierarchyclass
JDBC Trace Facility Demonstration Programs❍ Glossary● Index● List of Examples● List of Figures● List of Tables● JDBC/MP Doc Home PageHP JD
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV PACKAGE NEXT PACKAGE Package com.tandem.sqlmpClass SummarySQLMP
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV NEXT Uses of Packagecom.tandem.sqlmpNo usage of com.tandem.sqlmpP
Package Class Use Tree Next Index Help HP JDBC Driver for SQL/MP PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL:
intgetLoginTimeout() Retrieves the maximum time in seconds that thisConnectionPoolDataSource object will wait whileattempting to connect to
voidsetJdbcPropfile(String jdbcPropfile) Sets the name of the Properties file that provides for aliasnames for SQL/MP tables. voidsetLoginTi
Constructor DetailSQLMPConnectionPoolDataSourcepublic SQLMPConnectionPoolDataSource()Method DetailgetPooledConnectionpublic javax.sql.PooledConnection
getLogWriterpublic java.io.PrintWriter getLogWriter() throws java.sql.SQLExceptionRetrieves the log writer for this SQ
setLoginTimeoutpublic void setLoginTimeout(int seconds) throws java.sql.SQLExceptionSets the maximum time in seconds that a Connec
java.sql.SQLException - if the number of statements exceeds the maximum allowed by thedatabase.See Also:getMaxStatements()getMaxStatementspublic int g
Sets the number of physical connections the pool should keep available at all times. 0 (zero) indicates thatconnections should be created as needed.Pa
Comentários a estes Manuais