JDBC Developer's Guide - Supra - Cincom
JDBC Developer's Guide - Supra - Cincom JDBC Developer's Guide - Supra - Cincom
Datatype mappingsThe Cincom ORDB JDBC driver supports the SQL datatypes required by JDBC1.22.For reference, the following table shows the default mappings between JDBCdatatypes, native Java datatypes, and SQL datatypes:♦♦♦The Standard JDBC Datatypes column lists the datatypes supported by theJDBC 1.22 standard. The java.sql.Types class defines all of thesedatatypes.The Java Native Datatypes column lists the datatypes defined by the Javalanguage.The SQL Datatypes column lists the SQL datatypes that exist in thedatabase.Standard JDBC datatypes Java native datatypes SQL datatypesjava.sql.Types.CHAR java.lang.String CHAR(n)java.sql.Types.VARCHAR java.lang.String VARCHAR(n), STRINGjava.sql.Types.BINARY byte[] BIT(n) (n < 33)java.sql.Types.BIT Boolean BIT(1)java.sql.Types.VARBINARY byte[] BIT VARYING(n)java.sql.Types.NUMERIC java.math.BigDecimal NUMBER(p,s)java.sql.Types.DECIMAL java.math.BigDecimal DECIMAL(p,s)java.sql.Types.INTEGER int INTEGERjava.sql.Types.SMALLINT short SMALLINTjava.sql.Types.FLOAT float FLOAT(p)java.sql.Types.REAL double REALjava.sql.Types.DOUBLE double DOUBLE PRECISIONjava.sql.Types.DATE java.sql.Data DATEjava.sql.Types.TIME java.sq.Time TIMEjava.sql.Types.TIMESTAMP java.sql.Timestamp LONGRAWjava.sql.Types.ARRAY java.sql.Array SETjava.sql.Types.ARRAY java.sql.Array MULTISETjava.sql.Types.ARRAY java.sql.Array SEQUENCEjava.sql.Types.REF jav.sql.Ref OBJECT REFERENCEJDBC Developer's Guide, P25-9504-03 Page 25Chapter: 3. Basic FeaturesSection: Datatype mappings
- Page 1: SQL ACCESS FOR SUPRASERVER PDM ®JD
- Page 4 and 5: Contents1. Overview ...............
- Page 6 and 7: 6. Coding tips and troubleshooting
- Page 8 and 9: What is JDBC?JDBC (Java Database Co
- Page 10: Cincom ORDB extensions to the JDBC
- Page 13 and 14: Checking installed directories and
- Page 15 and 16: Testing JDBC and the database conne
- Page 17 and 18: System.out.println ("Please enter i
- Page 19 and 20: 3. Basic FeaturesIntroductionThis c
- Page 21 and 22: Step 2: Open a connection to a data
- Page 23: Step 5: Process the ResultSet objec
- Page 27 and 28: Error Messages and JDBCTo handle ex
- Page 29 and 30: Class ordbDriverThe ordbjava.jdbc.o
- Page 31 and 32: Working with Cincom ORDB objects an
- Page 33 and 34: Inserting, deleting, and updating d
- Page 35 and 36: display the descriptionpstmt.setRef
- Page 37 and 38: invoke the methodordbObject locatio
- Page 39 and 40: Generating Java classes from a data
- Page 41 and 42: See the jaccommodations class below
- Page 43 and 44: }// The application needs to call t
- Page 45 and 46: public jaccommodations(){ }/** Cons
- Page 47 and 48: * Database method.*/// The mapping
- Page 49 and 50: Adding entries. The following gener
- Page 51 and 52: custom mapped class, then.// 5. Inv
- Page 53 and 54: Turn off AutoPerformCustomMapping (
- Page 55 and 56: Inserting, deleting, and updating w
- Page 57 and 58: displaying seashore description aft
- Page 59 and 60: Implementing readSQL() and writeSQL
- Page 61 and 62: Working with Cincom ORDB collection
- Page 63 and 64: Retrieving a subset of an array’s
- Page 65 and 66: Working with heterogeneous collecti
- Page 67 and 68: Homogeneous collections and Java pr
- Page 69 and 70: Clean up Cincom ORDB workspace used
- Page 71 and 72: display the size and contents of th
- Page 73 and 74: Collections and custom mappingBy de
Datatype mappingsThe <strong>Cincom</strong> ORDB <strong>JDBC</strong> driver supports the SQL datatypes required by <strong>JDBC</strong>1.22.For reference, the following table shows the default mappings between <strong>JDBC</strong>datatypes, native Java datatypes, and SQL datatypes:♦♦♦The Standard <strong>JDBC</strong> Datatypes column lists the datatypes supported by the<strong>JDBC</strong> 1.22 standard. The java.sql.Types class defines all of thesedatatypes.The Java Native Datatypes column lists the datatypes defined by the Javalanguage.The SQL Datatypes column lists the SQL datatypes that exist in thedatabase.Standard <strong>JDBC</strong> datatypes Java native datatypes SQL datatypesjava.sql.Types.CHAR java.lang.String CHAR(n)java.sql.Types.VARCHAR java.lang.String VARCHAR(n), STRINGjava.sql.Types.BINARY byte[] BIT(n) (n < 33)java.sql.Types.BIT Boolean BIT(1)java.sql.Types.VARBINARY byte[] BIT VARYING(n)java.sql.Types.NUMERIC java.math.BigDecimal NUMBER(p,s)java.sql.Types.DECIMAL java.math.BigDecimal DECIMAL(p,s)java.sql.Types.INTEGER int INTEGERjava.sql.Types.SMALLINT short SMALLINTjava.sql.Types.FLOAT float FLOAT(p)java.sql.Types.REAL double REALjava.sql.Types.DOUBLE double DOUBLE PRECISIONjava.sql.Types.DATE java.sql.Data DATEjava.sql.Types.TIME java.sq.Time TIMEjava.sql.Types.TIMESTAMP java.sql.Timestamp LONGRAWjava.sql.Types.ARRAY java.sql.Array SETjava.sql.Types.ARRAY java.sql.Array MULTISETjava.sql.Types.ARRAY java.sql.Array SEQUENCEjava.sql.Types.REF jav.sql.Ref OBJECT REFERENCE<strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 25Chapter: 3. Basic FeaturesSection: Datatype mappings