SE_table_make_qualified_name

Constructs a qualified name for a specific DBMS.

Usage syntax

LONG SE_table_make_qualified_name
(SE_CONNECTION connection,
const CHAR *database,
const CHAR *owner,
const CHAR *table,
const CHAR *column,
CHAR *qualified_name);

Parameters
connection The connection handle
database The database name. This can be NULL
owner The table owner. This can be NULL
table The name of the table. This can be NULL
column The DBMS column name. This can be NULL
qualified_name The qualified DBMS name
Description

SE_table_make_qualified_name makes a qualified table or column name for a specific DBMS. Each DBMS constructs a qualified or complete name differently.

Oracle® or DB2® Universal Database

owner.table.column

Sybase® or Microsoft SQL Server™

database.owner.table.column

Informix® Dynamic Server

database:owner.table.column

ArcInfo®

table or column

Jet™

table.column

Here’s an example.

LONG test_qualified_name(SE_CONNECTION handle)

{

      CHAR  qualified_name[SE_QUALIFIED_COLUMN_LEN];

      CHAR  database[SE_MAX_DATABASE_LEN];

      CHAR  owner[SE_MAX_OWNER_LEN];

      CHAR  table[SE_MAX_TABLE_LEN];

      CHAR  column[SE_MAX_COLUMN_LEN];

      LONG rc=SE_SUCCESS;

 

      strcpy(database, "  sde40");

      strcpy(owner, "sdetest ");

      strcpy(table, " borders ");

      strcpy(column, "  feature  ");

 

      fprintf(stdout, "TEST1: make a qualified column name with the database,

              owner, table and column names \n");

 

      rc = SE_table_make_qualified_name ( handle, database, owner, table,

              column, qualified_name);

      QA_returncode_check( handle, NULL, rc, " SE_table_make_qualified_name ");

     

      fprintf(stdout, "The qualified_name = %s \n", qualified_name);

   

      fprintf(stdout, "TEST2: make a qualified column name with the owner,

              table and column names. \n");

 

/* . . . */

}

Returns

SE_SUCCESS
SE_DB_IO_ERROR

SE_INVALID_CONNECTION

SE_INVALID_POINTER

SE_NET_FAILURE

SE_SDE_NOT_STARTED

SE_TABLE_NOEXIST