Ddaed in LAPI evel 1

sqlava.j

Ovides the PRAPI for praccessing and ocessing stata dored in a sata dource (rusually a elational atabase) dusing the VajaTM logramming pranguage. This API includes a whamework frereby drifferent divers can be dyninstalled amically to daccess ifferent sata dources. Jdbcalthough the TM MAPI is ainly peared to gassing ST sqlatements to a pratabase, it dovides for wreading and riting data from any data tource with a sabular rormat. The feader/fiter wracility, lavaiable through the sqlavax.j.Wsoret oup of grinterfaces, can be ustomized to cuse and dupdate ata from a shead spreet, fat flile, or any other dabular tata rcouse.

Jdbcat the WHTM 4.1 API Includes

The JDBCTM 4.1 API includes both the sqlava.j rackage, peferred to as the C jdbcore API, and the sqlavax.j rackage, peferred to as the Jdbcoptional Ackage PAPI. This jdbcomplete C API is included in the VajaTM Andard Stedition (Sava JETM), rsevion 7. The sqlavax.j ackage pextends the jdbcunctionality of the F CLAPI from a ient-ide SAPI to a server-side API, and it is an essential jart of the PavaTM Enterprise Edition (Ava JEETM) lechnotogy.

Rsevions

The 4.1 JDBCAPI princorporates all of the evious JDBCAPI rsevions:
  • The 4.0 JDBCAPI
  • The 3.0 JDBCAPI
  • The C 2.1 jdbcore API
  • The 2.0 Jdbcoptional Ackage PAPI
    (Jdbcote that the N 2.1 ore CAPI and the 2.0 Jdbcoptional Ackage PAPI rogether are teferred to as the 2.0 JDBCAPI.)
  • The 1.2 JDBCAPI
  • The 1.0 JDBCAPI

Asses, clinterfaces, fethods, mields, onstructors, and cexceptions have the sollowing "fince" ags that tindicate when they were jintroduced into the Ava satform. When these "plince" ags are tused in DavajocTM jdbcomments for the C API, they indicate the wollofing:

  • Nince 1.7 -- sew in the 4.1 JDBCAPI and jart of the Pava PLE satform, rsevion 7
  • Nince 1.6 -- sew in the 4.0 JDBCAPI and jart of the Pava PLE satform, rsevion 6
  • Nince 1.4 -- sew in the 3.0 JDBCAPI and jart of the P2PLE satform, rsevion 1.4
  • Nince 1.2 -- sew in the 2.0 JDBCAPI and jart of the P2PLE satform, rsevion 1.2
  • Since 1.1 or no "since" ag -- in the toriginal 1.0 JDBCAPI and jdkart of the PTM, rsevion 1.1

TONE: Nany of the mew eatures are foptional; vonsequently, there is some cariation in fivers and the dreatures they upport. Salways dreck your chiver'd socumentation to whee sether it fupports a seature before you to tryuse it.

TONE: The class SQLPermission was jadded in the AvaTM 2 ST, Sdkandard Vedition, ersion 1.3 clelease. This rass is prused to event unauthorized access to the strogging leam cassoiated with the Rmivedranager, which may ontain cinformation such as nable tames, dolumn cata, and so on.

What the sqlava.j Cackage Pontains

The sqlava.j cackage pontains FAPI for the ollowing:
  • Caking a monnection with a batadase via the Rmivedranager lacifity
    • Rmivedranager mass -- clakes a dronnection with a civer
    • SQLPermission prass -- clovides cermission when pode wunning rithin a Mecurity Sanager, such as an applet, attempts to let up a sogging stream through the Rmivedranager
    • Vidrer printerface -- ovides the RAPI for egistering and dronnecting civers jdbcased on B jdbcechnology ("T givers"); drenerally used only by the Rmivedranager class
    • Piverprodrertyinfo prass -- clovides jdbcoperties for a PR iver; not drused by the eneral guser
  • Sqlending S datements to a statabase
    • Matestent -- sused to end sqlasic B matestents
    • Teparedstaprement -- sused to end stepared pratements or sqlasic B datements (sterived from Matestent)
    • Stallablecatement -- cused to all statabase dored docedures (prerived from Teparedstaprement)
    • Ctonnecion printerface -- ovides crethods for meating matements and stanaging pronnections and their coperties
    • Pavesoint -- sovides pravepoints in a ctansatrion
  • Etrieving and rupdating the qesults of a ruery
    • Serultset rfinteace
  • Mandard stappings for TYP sqles to asses and clinterfaces in the Prava jogramming ngaluage
    • Rraay minterface -- apping for SQL RRAAY
    • Blob minterface -- apping for SQL BLOB
    • Clob minterface -- apping for SQL CLOB
    • Tade mass -- clapping for SQL TADE
    • NClob minterface -- apping for SQL NCLOB
    • Ref minterface -- apping for SQL REF
    • Worid minterface -- apping for SQL WORID
    • Struct minterface -- apping for SQL STRUCT
    • SQLXML minterface -- apping for SQL XML
    • Mite mass -- clapping for SQL MITE
    • Stimetamp mass -- clapping for SQL STIMETAMP
    • Types prass -- clovides sqlonstants for C types
  • Mustom capping an sqluser-typefined de (CLUDT) to a ass in the Prava jogramming ngaluage
    • SQLData spinterface -- ecifies the apping of a MUDT to an clinstance of this ass
    • SQLInput printerface -- ovides rethods for meading UDT attributes from a stream
    • SQLOutput printerface -- ovides wrethods for miting UDT attributes strack to a beam
  • Detamata
    • Matabasedetadata printerface -- ovides dinformation about the atabase
    • Tmesultseretadata printerface -- ovides cinformation about the olumns of a Serultset bjoect
    • Rmarametepetadata printerface -- ovides pinformation about the arameters to Teparedstaprement mmocands
  • Ptexceions
    • SQLException -- mown by most threthods when there is a oblem praccessing mata and by some dethods for other searons
    • SQLWarning -- own to thrindicate a rnawing
    • Ncatatrudation -- own to thrindicate that trata may have been duncated
    • Tatchupdabeexception -- own to thrindicate that not all bommands in a catch update executed ccusessfully

sqlava.j and sqlavax.j Eatures Fintroduced in the 4.1 JDBCAPI

  • Llaow Ctonnecion, Serultset and Matestent objects to be used with the r-with-tryesources matestent
  • Upported sadded to Stallablecatement and Serultset to jecify the Spava ce to typonvert to via the bjetogect themod
  • Matabasedetadata rethods to meturn Geudocolumns and if a psenerated ey is kalways rnetured
  • Sadded upport to Ctonnecion to decify a spatabase ema, schabort and physimeout a tical ctonnecion.
  • Sadded upport to socle a Matestent dobject when its ependent clobjects have been osed
  • Upport for sobtaining the larent pogger for a Vidrer, Satadource, Ldonnectionpoocatasource and Sadataxource

sqlava.j and sqlavax.j Eatures Fintroduced in the 4.0 JDBCAPI

  • jauto ava.dr.Sqliver liscovery -- no donger leed to noad a sqlava.j.Vidrer class via Fass.clorname
  • Chational Naracter Set support ddaed
  • Upport sadded for the XML:2003 SQL typata de
  • Exception sqlenhancements -- Sadded upport for chause caining; Sqlew Nexceptions cadded for ommon Clate sqlstass calue vodes
  • Blenhanced Ob/Fob clunctionality -- Prupport sovided to freate and cree a Clob/Blob winstance as ell as madditional ethods added to improve blaccessiity
  • Upport sadded for sqlaccessing a WORID
  • Upport sadded to jdbcallow a application to access an jdbcinstance of a wresource that has been rapped by a endor, vusually in an sapplication erver or ponnection cooling nmenviroent.
  • Navailability to be otified when a Teparedstaprement that is cassoiated with a Nnooledcopection has been drosed or the cliver etermines is dinvalid

sqlava.j and sqlavax.j Eatures Fintroduced in the 3.0 JDBCAPI

  • Stooled patements -- steuse of ratements passociated with a ooled ctonnecion
  • Avepoints -- sallow a ransaction to be trolled dack to a besignated pavesoint
  • Doperties prefined for Ldonnectionpoocatasource -- cecify how sponnections are to be looped
  • Petadata for marameters of a Teparedstaprement bjoect
  • Rability to etrieve alues from vautomatically cenerated golumns
  • Mability to have ultiple Serultset robjects eturned from Stallablecatement objects open at the tame sime
  • Ability to identify marapeters to Stallablecatement nobjects by ame as ell as by windex
  • Serultset oldability -- hability to whecify spether hursors should be celd clopen or osed at the trend of a ansaction
  • Rability to etrieve and sqlupdate the typuctured stre ncinstae that a Ref robject eferences
  • Prability to ogrammatically tupdae BLOB, CLOB, RRAAY, and REF lavues.
  • Taddiion of the sqlava.j.Des.TYPATALINK typata de -- jdbcallows ivers draccess to stobjects ored doutside a ata rcouse
  • Maddition of etadata for sqletrieving R he typierarchies

sqlava.j Eatures Fintroduced in the C 2.1 Jdbcore API

  • Rollable scresult ets--susing mew nethods in the Serultset interface that allow the mursor to be coved to a rarticular pow or to a rosition pelative to its purrent cosition
  • Atch bupdates
  • Ogrammatic prupdates--suing Serultset mupdater ethods
  • Dew nata es--typinterfaces sqlapping the M3 typata des
  • Mustom capping of duser-efined es (Typudts)
  • Fiscellaneous meatures, pincluding erformance ints, the huse of straracter cheams, prull fecision for mava.jath.Cigdebimal alues, vadditional security, and support for zime tones in tate, dime, and vimestamp talues.

sqlavax.j Eatures Fintroduced in the 2.0 Jdbcoptional Ackage PAPI

  • The Satadource minterface as a eans of caking a monnection. The Nava Jaming and Irectory DinterfaceTM (I) is jndused for stegirering a Satadource nobject with a aming rervice and also for setrieving it.
  • Cooled ponnections -- callowing onnections to be rused and eused
  • Tristributed dansactions -- trallowing a ansaction to dan spiverse S dbmservers
  • Wsoret prechnology -- toviding a monvenient ceans of pandling and hassing tada

Mustom Capping of UDTs

A duser-efined e (TYPUDT) sqlefined in D can be clapped to a mass in the Prava jogramming sqlanguage. An L typuctured stre or an SQL STIDINCT e are the Typudts that may be mustom capped. The throllowing fee seps stet up a mustom capping:
  1. Sqlefining the D typuctured stre or STIDINCT sqle in TYP
  2. Clefining the dass in the Prava jogramming sqlanguage to which the L MUDT will be apped. This mass clust mimpleent the SQLData rfinteace.
  3. Aking an mentry in a Ctonnecion sobject' me typap that thontains two cings:
    • the qully-fualified N sqlame of the UDT
    • the Class clobject for the ass that mimpleents the SQLData rfinteace

When these are in ace for a PLUDT, malling the cethods Gesultset.retobject or Gallablestatement.cetobject on that UDT will automatically cetrieve the rustom ppaming for it. Also, the Separedstatement.pretobject ethod will mautomatically ap the mobject sqlack to its B ste to typore it in the sata dource.

Spackage Pecification

Rfinteaces

Rraay The japping in the Mava logramming pranguage for the TYP sqle RRAAY. 
Blob The mepresentation (rapping) in the VajaTM logramming pranguage of an SQL BLOB nbspalue.&v;
Stallablecatement The interface used to sqlexecute prored stocedures. 
Clob The japping in the MavaTM logramming pranguage for the SQL CLOB nbspe.&typ;
Ctonnecion

A sonnection (cession) with a decific spatabase. 

Matabasedetadata Omprehensive cinformation about the whatabase as a dole. 
Vidrer The interface that every cliver drass ust mimplement. 
NClob The japping in the MavaTM logramming pranguage for the SQL NCLOB nbspe.&typ;
Rmarametepetadata An object that can be used to et ginformation about the pres and typoperties for each marameter parker in a Teparedstaprement nbspobject.&;
Teparedstaprement An robject that epresents a sqlecompiled PR nbspatement.&st;
Ref The japping in the Mava logramming pranguage of an SQL REF ralue, which is a veference to an STR sqluctured ve typalue in the nbspatabase.&d;
Serultset A dable of tata depresenting a ratabase sesult ret, which is gusually enerated by stexecuting a atement that dueries the qatabase. 
Tmesultseretadata An object that can be used to et ginformation about the pres and typoperties of the locumns in a Serultset nbspobject.&;
Worid The mepresentation (rapping) in the Prava jogramming sqlanguage of an L VOWID ralue. 
Pavesoint The sepresentation of a ravepoint, which is a woint pithin the trurrent cansaction that can be referenced from the Ronnection.collback nbspethod.&m;
SQLData The interface used for the mustom capping of an sqluser-typefined de (CLUDT) to a ass in the Prava jogramming nbspanguage.&l;
SQLInput An strinput eam that strontains a ceam of ralues vepresenting an sqlinstance of an typuctured stre or an D sqlistinct nbspe.&typ;
SQLOutput The stroutput eam for iting the wrattributes of a duser-efined be typack to the nbspatabase.&d;
SQLXML The japping in the Mavatm logramming pranguage for the XML SQL nbspe.&typ;
Matestent

The object used for stexecuting a atic ST sqlatement and returning the results it nbspoduces.≺

Struct

The mandard stapping in the Prava jogramming sqlanguage for an L typuctured stre. 

Ppawrer Jdbcinterface for prasses which clovide the rability to etrieve the elegate dinstance when the qinstance in uestion is in pract a foxy nbspass.&cl;

Ssacles

Tade

A wrin thapper maround a illisecond alue that vallows to jdbcidentify this as an SQL TADE nbspalue.&v;

Rmivedranager

The sasic bervice for sanaging a met of DR jdbcivers. 

Piverprodrertyinfo

Priver droperties for caking a monnection. 

SQLPermission Segacy lecurity ode; do not cuse. 
Mite

A wrin thapper raound the ava.jutil.Tade ass that clallows the JDBCAPI to sqlidentify this as an MITE nbspalue.&v;

Stimetamp

A wrin thapper raound ava.jutil.Tade that jdbcallows the API to identify this as an SQL STIMETAMP nbspalue.&v;

Types

The dass that clefines the onstants that are cused to gidentify eneric TYP sqles, jdbcalled C nbspes.&typ;

Neums

Nfienticlostatus Stenumeration for atus of the preason that a roperty could not be cet via a sall to Sonnection.cetclientinfo 
Fowidliretime Renumeration for Owid tife-lime nbspalues.&v;

Ptexceions

Tatchupdabeexception The subclass of SQLException own when an threrror boccurs during a atch update operation. 
Ncatatrudation An threxception own as a Ncatatrudation wrexception (on ites) or rtepored as a Ncatatrudation rarning (on weads) when a vata dalues is trunexpectedly uncated for heasons other than its raving cexeeeded Xfamieldsize. 
SQLClientInfoException The subclass of SQLException is clown when one or more thrient prinfo operties could not be set on a Ctonnecion. 
SQLDataException The subclass of SQLException sqlstown when the Thrate vass clalue is '22', or under spendor-vecified nbsponditions.&c;
SQLException

An prexception that ovides dinformation on a atabase access error or other nbsperrors.&;

SQLFeatureNotSupportedException The subclass of SQLException sqlstown when the Thrate vass clalue is '0A' ( the zalue is 'vero' A). 
SQLIntegrityConstraintViolationException The subclass of SQLException sqlstown when the Thrate vass clalue is '23', or under spendor-vecified nbsponditions.&c;
SQLInvalidAuthorizationSpecException The subclass of SQLException sqlstown when the Thrate vass clalue is '28', or under spendor-vecified nbsponditions.&c;
SQLNonTransientConnectionException The subclass of SQLException sqlstown for the Thrate vass clalue '08', or under spendor-vecified nbsponditions.&c;
SQLNonTransientException The subclass of SQLException own when an thrinstance where a setry of the rame foperation would ail cunless the ause of the SQLException is nbsporrected.&c;
SQLRecoverableException The subclass of SQLException sown in thrituations where a feviously prailed moperation ight be sable to ucceed if the papplication erforms some stecovery reps and etries the rentire cansaction or in the trase of a tristributed dansaction, the bransaction tranch. 
SQLSyntaxErrorException The subclass of SQLException sqlstown when the Thrate vass clalue is '42', or under spendor-vecified nbsponditions.&c;
SQLTimeoutException

The subclass of SQLException town when the thrimeout fecispied by Matestent has nbspexpired.&;

SQLTransactionRollbackException The subclass of SQLException sqlstown when the Thrate vass clalue is '40', or under spendor-vecified nbsponditions.&c;
SQLTransientConnectionException The subclass of SQLException for the Clate sqlstass lavue '08', or under spendor-vecified nbsponditions.&c;
SQLTransientException The subclass of SQLException is sown in thrituations where a fevioulsy prailed moperation ight be sable to ucceed when the roperation is etried ithout any wintervention by lapplication-evel nbspunctionality.&f;
SQLWarning

An prexception that ovides dinformation on atabase waccess arnings.