SqlUtilEnumerateSchemas - cDbUpdateFunctionLibrary
Enumerates SQL schemas for the passed driver ID.
Type: Function
Parameters: String sDriverID
Parameter |
Description |
sDriverID |
DB2_DRV_ID, ORAFLEX or MDSPgSQL |
Syntax
Function SQLUtilEnumerateSchemas String sDriverID Returns String[]
Call: |
Get SQLUtilEnumerateSchemas DB2_DRV_ID to sMyArray |
Description
Use it to retrieve all SQL schemas from an 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 SqlUtilEnumerateSchemas 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