Collection Contents Index Overview ODBC-based server classes pdf/chap29.pdf

User's Guide
   PART 4. Database Administration and Advanced Use
     CHAPTER 29. Server Classes for Remote Data Access       

JDBC-based server classes


JDBC-based server classes are used when Adaptive Server Anywhere internally uses a Java virtual machine and jConnect 4.0 to connect to the remote server. The JDBC-based server classes are:

Top of page  Configuration notes for JDBC classes

When you access remote servers defined with JDBC-based classes, consider the following:

Top of page  Server class asajdbc

A server with server class asajdbc is:

No special requirements exist for the configuration of an Adaptive Server Anywhere data source.

Top of page  USING parameter value in the CREATE SERVER statement

The USING parameter in the CREATE SERVER statement takes the form hostname:portnumber [/databasename], where:

For example, to configure an Adaptive Server Anywhere named testasa that is located on the machine ????? and listening on port number 2638, use:

CREATE SERVER testasa 
CLASS 'asajdbc' 
USING 'apple:2638' 

You must perform a separate CREATE SERVER for each Adaptive Server Anywhere database that you intend to access. For example, if an Adaptive Server Anywhere server named testasa is running on the machine 'banana' and owns 3 databases (db1, db2, db3), you would configure the local Adaptive Server Anywhere similar to this:

CREATE SERVER testasadb1 
CLASS 'asajdbc'
USING 'banana:2638/db1'
CREATE SERVER testasadb2 
CLASS 'asajdbc'
USING 'banana:2638/db2'
CREATE SERVER testasadb2 
CLASS 'asajdbc'
USING 'banana:2638/db3'

If you do not specify a /databasename value, the remote connection will use the remote Adaptive Server Anywhere default database.

Top of page  Server class asejdbc

A server with server class asejdbc is:

No special requirements exist for the configuration of an Adaptive Server Enterprise data source.

Top of page  Data type conversions

When you issue a CREATE TABLE statement, Adaptive Server Anywhere automatically converts the data types to the corresponding Adaptive Server Enterprise data types. Table 2-1 describes the Adaptive Server Anywhere to Adaptive Server Enterprise data type conversions.

Adaptive Server Anywhere Data type

ASE Default Data type

bit

bit

tinyint

tinyint

smallint

smallint

int

int

integer

integer

decimal [defaults p=30, s=6]

numeric(30,6)

decimal(128,128)

not supported

numeric [defaults p=30 s=6]

numeric(30,6)

numeric(128,128)

not supported

float

real

real

real

double

float

smallmoney

numeric(10,4)

money

numeric(19,4)

date

datetime

time

datetime

timestamp

datetime

smalldatetime

datetime

datetime

datetime

char(n)

varchar(n)

character(n)

varchar(n)

varchar(n)

varchar(n)

character varying(n)

varchar(n)

long varchar

text

text

text

binary(n)

binary(n)

long binary

image

image

image

bigint

numeric(20,0)

Top of page  


Collection Contents Index Overview ODBC-based server classes pdf/chap29.pdf