<<

Contents

Search

>>

 

COPY_EBUS_INDEXFILE_TO_JDBC

 

 

Function

 

 

Syntax:

COPY_EBUS_INDEXFILE_TO_JDBC(<Name of Index File>)

 

<Name of Index File> = <INDEX FILE>

 

Meaning:

Copies then content of an EBUS Index File to a JDBC Index File.

 

Ebus Index Files are stored in files whereas JDBC Index Files are stored in SQL databases.

 

COPY_EBUS_INDEXFILE_TO_JDBC copies all data records of the Ebus Index File <Name of Index File> to an SQL database. The necessary informations about the SQL database have to be defined by the following instructions:

 

JDBC_DRIVER specifies the JDBC driver.

JDBC_DATABASE specifies the name of the database in which the Index File is opened.

JDBC_TABLE specifies the table name of the Index File in the database.

JDBC_USERID specifies the userid.

JDBC_PASSWORD specifies the password.

 

COPY_EBUS_INDEXFILE_TO_JDBC returns the number of records that have been copied or an error code:

 

Error code

Meaning

-1

Invalid file number

-2

<Name of Index File> is not an Ebus Index File but an JDBC Index File.

-3

<Name of Index File> contains no data records.

-4

Error opening the JDBC table. OK, OK2 and ERRORTEXT$ contain the error information.

-5

Error reading the Ebus Index File. OK, OK2 and ERRORTEXT$ contain the error information.

-6

Error writing the JDBC Index File. OK, OK2 and ERRORTEXT$ contain the error information.

 

Parameter:

Name of Index File

Name of Index File

 

Sample:

JDBC_DRIVER(CUSTOMER) = "com.ibm.db2.jcc.DB2Driver"

JDBC_DATABASE(CUSTOMER) = "jdbc:db2://localhost:50000/sample"

JDBC_TABLE(CUSTOMER) = "Customer"

JDBC_PASSWORD(CUSTOMER) = "Xyz123"

JDBC_USERID(CUSTOMER) = "Hugo"

 

NUMBER% = COPY_EBUS_INDEXFILE_TO_JDBC(CUSTOMER)

 

IF NUMBER% < 0

THEN ERRORMES = "Error " + STR$(NUMBER%)

ENDIF

 

See also:

COPY_JDBC_INDEXFILE_TO_EBUS

CHANGE_FILETYPE

JDBC_DRIVER

JDBC_DATABASE

JDBC_TABLE

JDBC_PASSWORD

JDBC_USERID