DB_Setting1List + DB_Setting1List_NameValue

DB_Setting1List is to Returns list of SettingValues matching certain SettingMask
While DB_Setting1List_NameValue, returns string of paired SettingName and SettingValue matching SettingMask
String returned is separated with default Separator expected to be defined.

Function DB_Setting1List(SettingMask, Sepa)
 ' Creates list of settings with similar mask
 If Sepa="" Then Sepa=Default_Sepa
 DB_SettingList=""'String(3,String(2,Sepa))
 set recordsetF=connection.execute("Select * From FinishProduct_Settings Where SettingName like '" & _
  SettingMask & "' order by SettingName")
 if recordsetF.eof then exit function
 GGe=""
 Do Until recordsetF.eof
  If GGe>"" Then GGe=GGe & Sepa
  GGe=GGe & Trim(RecordSetF(3).value)
  recordsetf.MoveNext
 Loop
 DB_Setting1List=GGe
 Set RecordsetF = nothing
End Function
Function DB_Setting1List_NameValue(SettingMask)
 ' Creates list of settings with similar mask
 ' Return list is pair of Name|Value
 DB_SettingList_NameValue = ""
 set recordsetF=connection.execute("Select * From FinishProduct_Settings Where SettingName like '" & _
  SettingMask & "' order by SettingName")
 if recordsetF.eof then exit function
 GGe=""
 Do Until recordsetF.eof
  If GGe>"" Then GGe=GGe & Default_SepaR
  GGe = GGe & CutString(Trim(RecordSetF(2).value), SettingMask, "", 1) & Default_Sepa
  GGe = GGe & Trim(RecordSetF(3).value)
  recordsetf.MoveNext
 Loop
 DB_Setting1List_NameValue = GGe
 Set RecordsetF = nothing
End Function

SettingMask, Sepa

Views 437 Downloads 152

'connection object as connection to DB
', 'DB', 'database', 'setting', 'list', 'ANString', 'ANStr', 'ANStrList'

ANmarAmdeen
324
Database Classic ASP
Revisions

v2.0