<<

Contents

Search

>>

 

JDBC_DROP_TABLE

 

 

Function

 

 

Syntax:

JDBC_DROP_TABLE(<Name of Index File>)

 

<Name of Index File> = <INDEXFILE>

 

 

Meaning:

The table <Name of Index File> in the SQL database is deleted completely. 

 

Note: The Index File <Index file name> must be open! If DROP_TABLE has been executed successfully, the Index File must be closed with ICLOSE. If the Index File is then re-opened again with IOPEN, a new table is created in the SQL database. 

 

JDBC_DROP_TABLE returns the following results:

 

Result

Meaning

1

No error

-1

An error occurred with deleting the table. OK, OK2 and ERRORTEXT$ contain the error text.

-2

A runtime error occurred. 

-3

<Name of Index File> is no JDBC index file.

-5

<Name of Index File> is invalid.

 

Parameter:

Name of Index File

Name of Index File

 

Sample:

H% = JDBC_DROP_TABLE(CUSTOMER)

IF H% <> 1

THEN IF H% = -1

     THEN ERRORMES = "Error with JDBC_DROP_TABLE:" + STR$(H%) + " " +

                     ERRORTEXT$

     ELSE ERRORMES = "Error with JDBC_DROP_TABLE:" + STR$(H%)

     ENDIF

ELSE ICLOSE(CUSTOMER)

     IOPEN(CUSTOMER) // A new table CUSTOMER will be created

ENDIF

 

See also:

DELETE

KILL_INDEXFILE

KILL