Posted By

gsherman on 04/22/09


Tagged

CB clearbasic


Versions (?)

GetConfigItem


 / Published in: Visual Basic
 

GetConfigItem config_itm

  1. Function GetConfigItem(configName as String) as String
  2. Dim MyBulkR as New BulkRetrieve
  3. Dim configItmRec as Record
  4. Dim dbString as String
  5.  
  6. GetConfigItem= ""
  7.  
  8. MyBulkR.SimpleQuery 0, "config_itm"
  9. MyBulkR.AppendFilter 0, "name", cbEqual, configName
  10. MyBulkR.RetrieveRecords
  11. Dim MyList As List
  12. Set MyList = MyBulkR.GetRecordList(0)
  13. If MyList.Count = 1 Then
  14. Set configItmRec = MyList.ItemByIndex(0)
  15. GetConfigItem = configItmRec.GetField("str_value")
  16. End If
  17. End Function

Report this snippet  

You need to login to post a comment.