SqlUtilEnumerateTables - cDbUpdateFunctionLibrary

Enumerates SQL data tables for the passed driver ID.


Type: Function


Parameters: String sDriverID

Parameter

Description

sDriverID

MSSQLDRV_ID, DB2_DRV_ID, ODBC_DRV_ID, ORAFLEX, SQLFLEX, MDSPgSQL or MDSMySQL


Syntax


Function SQLUtilEnumerateTables String sDriverID Returns String[]

Call:

Get SQLUtilEnumerateTables MSSQLDRV_ID to sMyArray



Description

Use it to retrieve SQL tables on a machine. The return value is a string array. It relies on the SQLConnection string settings.



Example


Procedure Activating

     tDataSourceRow[] MyData

     Handle hoDataSource

     String[] sValueArray  

     String sDriverID                                          

     Integer iCount iSize

           

     Send Cursor_Wait of Cursor_Control

     Forward Send Activating

           

     Get psDriverID to sDriverID

     Send Ignore_Error of Error_Object_Id DFERR_CANT_LOAD_DLL

     Load_Driver sDriverID

     Send Trap_Error of Error_Object_Id DFERR_CANT_LOAD_DLL

     If (LastErr = 4255) Begin

         Send Info_Box ("Can't display any items because the database driver could not be loaded. (" + sDriverID + ")")

           Procedure_Return

     End

           

     Get SqlUtilEnumerateTables of ghoDbUpdateFunctionLibrary sDriverID to sValueArray

     

     Move (SizeOfArray(sValueArray)) to iSize

     Decrement iSize

     For iCount from 0 to iSize

           Move sValueArray[iCount] to MyData[iCount].sValue[0]

     Loop

           

     Get phoDataSource to hoDataSource

     Send InitializeData of hoDataSource MyData

     Send Cursor_Ready of Cursor_Control

End_Procedure