Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Dim objView, objRecord
  4. Dim strTableName, strPropertyName, strSite
  5.  
  6. strTableName = "HP_Site"
  7. strPropertyName = "HP_Site_Folder"
  8. strSite = UCase(Left(Session.Property("ComputerName"), 3))
  9.  
  10. Set objView = Session.Database.OpenView("Select `Folder` From `" & strTableName & "` Where `Site`='" & strSite & "'")
  11. objView.Execute
  12.         Set objRecord = objView.Fetch
  13.         if  (objRecord is nothing) OR (objRecord.StringData(1) is nothing) then Session.Property(strPropertyName) = "anyadat te geci"
  14.     elseif
  15.         Session.Property(strPropertyName) = objRecord.StringData(1)
  16.     end if
  17. objView.Close
  18. Set objRecord = Nothing
  19. Set objView = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement