SqlUtilEnumerateTableSpaces - cDbUpdateFunctionLibrary

Enumerates SQL table spaces for the passed driver ID. Only applicable for IBM DB2, Oracle and ProgressSQL.


Type: Function


Parameters: String sDriverID

Parameter

Description

sDriverID

DB2_DRV_ID, ORAFLEX or MDSPgSQL


Syntax


Function SQLUtilEnumerateTableSpaces String sDriverID Returns String[]

Call:

Get SQLUtilEnumerateDatabases DB2_DRV_ID to sMyArray



Description

Use it to retrieve all SQL table spaces from a SQL database server. The return value is a string array.



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 SqlUtilEnumerateTableSpaces 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