SqlUtilTableIsViewType - cDbUpdateFunctionLibrary

Checks if the type of a table is a standard data table or a View table.


Type: Function


Parameters: String sTableName String sFieldName

Parameter

Description

sDriverID

The database driver ID

hTable

Table handle (Filelist.cfg number)


Syntax


Function SQLUtilTableIsViewType String sDriverID Handle hTable Returns Boolean

Call:

Get SQLUtilTableIsViewType MSSQLDRV_ID MyViewTable.File_Number to bOK



Description

Checks if the passed table number is a normal data table or an SQL View data table.



Example


Procedure OnClick

    Handle hTable

    String sDriverID sTableName                                        

    Boolean bIsView

           

    Move 0 to hTable

    Get psDriverID of ghoDbUpdateFunctionLibrary to sDriverID

    Get_Attribute DF_FILE_NEXT_USED of hTable to hTable

    While (hTable <> 0)

        Get SQLUtilTableIsViewType  of ghoDbUpdateFunctionLibrary sDriverID hTable to bIsView

        Get UtilTableHandleToString of ghoDbUpdateFunctionLibrary hTable to sTableName

        Showln "hTable = " hTable " Table Name: " sTableName " table is: " (If(bIsView = True, "View Type", "Normal Table"))

        Get_Attribute DF_FILE_NEXT_USED of hTable to hTable

    Loop

End_Procedure