DB_SettingRead_Field

Returns a certain field from Settings table by a SettingName.
Similar to DB_SettingRead, except here you can control which field to return, not only the 'Value' field.


Public

Tested

My Own Work
Function DB_SettingRead_DateAdded(SettingID)
DB_SettingRead_DateAdded = DB_SettingRead_Field(SettingID, 5)
End Function
Function DB_SettingRead_DateModified(SettingID)
DB_SettingRead_DateModified = DB_SettingRead_Field(SettingID, 6)
End Function
Function DB_SettingRead_Field(SettingID, FieldNo)
DB_SettingRead_Field = "{{$N/A$}}"
SQLSt = "Select * from [Settings] where [SettingName]='" & SettingID & "' "
Set recordsetF = oConn.execute(SQLSt)
if recordsetF.eof Then Exit Function
DB_SettingRead_Field = Trim(RecordSetF(FieldNo).value)
Set RecordsetF = Nothing
End Function

SettingID, FieldNo

DB_SettingRead_DateAdded = DB_SettingRead_Field(SettingID, 5)
DB_SettingRead_DateModified = DB_SettingRead_Field(SettingID, 6)

Views 5151 Downloads 1175

Classic ASP Database
ANmarAmdeen
793
Revisions

v1.0